Fix current page index for leading/trailing chapter

This commit is contained in:
schroda
2025-02-10 01:33:41 +01:00
parent 174d850093
commit 6b48844c19

View File

@@ -278,11 +278,11 @@ export const getReaderChapterViewerCurrentPageIndex = (
return getInitialReaderPageIndex(visibleChapters.resumeMode, 0, chapter.pageCount - 1);
}
if (isTrailingChapter) {
if (isLeadingChapter) {
return Math.max(0, chapter.pageCount - 1);
}
if (isLeadingChapter) {
if (isTrailingChapter) {
return 0;
}
}