Fix page resume on reader chapter list selection of already visible chapter

In case the selected chapter was already visible, the page to resume did not get scrolled into view
This commit is contained in:
schroda
2025-04-26 23:08:05 +02:00
parent 37127893b4
commit f9930b94ca

View File

@@ -98,6 +98,8 @@ export const useReaderSetChaptersState = (
READER_STATE_CHAPTERS_DEFAULTS.visibleChapters.lastTrailingChapterSourceOrder,
isLeadingChapterPreloadMode: false,
isTrailingChapterPreloadMode: false,
// do not set "scrollIntoView" to "true" for the initial render
scrollIntoView: !!prevState.initialChapter,
}
: prevState.visibleChapters,
};