feat(mobile-ux): implement theme toggle, client-side persistence, and light mode style overrides #71

Merged
mjasin merged 3 commits from feature/mobile-ux-optimization into develop 2026-06-05 18:02:34 +00:00
Showing only changes of commit 12d701cb84 - Show all commits
@@ -432,9 +432,17 @@
{ {
try try
{ {
// Ensure the JS module is loaded and the component is fully rendered before invoking interop.
if (!_isJsInitialized)
{
await InitViewportDetectionAsync();
}
var module = await EnsureViewportModuleAsync(); var module = await EnsureViewportModuleAsync();
if (module != null)
{
await module.InvokeVoidAsync("scrollToTop", ".reader-canvas"); await module.InvokeVoidAsync("scrollToTop", ".reader-canvas");
} }
}
catch (Exception ex) catch (Exception ex)
{ {
Logger.LogWarning(ex, "Failed to scroll reader canvas to top."); Logger.LogWarning(ex, "Failed to scroll reader canvas to top.");