Fix current page index for leading/trailing chapter
This commit is contained in:
@@ -278,11 +278,11 @@ export const getReaderChapterViewerCurrentPageIndex = (
|
|||||||
return getInitialReaderPageIndex(visibleChapters.resumeMode, 0, chapter.pageCount - 1);
|
return getInitialReaderPageIndex(visibleChapters.resumeMode, 0, chapter.pageCount - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isTrailingChapter) {
|
if (isLeadingChapter) {
|
||||||
return Math.max(0, chapter.pageCount - 1);
|
return Math.max(0, chapter.pageCount - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLeadingChapter) {
|
if (isTrailingChapter) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user