Reader preserve current page on reader mode change (#906)

* Reader: Re-scroll on reader mode change

* Simplify reading mode restore

https://github.com/Suwayomi/Suwayomi-WebUI/pull/906#discussion_r2009147119

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>

* Move effect as per suggestion

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>

---------

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
This commit is contained in:
Constantin Piber
2025-03-24 23:24:36 +01:00
committed by GitHub
parent 8079cadae5
commit c9c1b8625a
2 changed files with 12 additions and 1 deletions

View File

@@ -260,10 +260,13 @@ const BaseReaderViewer = forwardRef(
scrollElementRef,
currentChapter?.id,
currentChapterIndex,
currentPageIndex,
chaptersToRender,
visibleChapters,
readingMode,
isContinuousReadingModeActive,
readingDirection,
setPageToScrollToIndex,
);
useLayoutEffect(() => {