Properly detect previous chapter load state

Regression from 174d850093
This commit is contained in:
schroda
2025-02-17 21:42:29 +01:00
parent e28c603112
commit eba3cadb8b

View File

@@ -321,7 +321,7 @@ const BaseReaderViewer = forwardRef(
(isLastLeadingChapter && visibleChapters.isLeadingChapterPreloadMode) ||
(isLastTrailingChapter && visibleChapters.isTrailingChapterPreloadMode);
const isPreviousChapterLoaded = !!chaptersToRender[currentChapterIndex + 1];
const isPreviousChapterLoaded = !!chaptersToRender[chapterIndex + 1];
const isPreviousChapterLastLeadingChapter = chapterIndex + 1 >= chaptersToRender.length - 1;
const isPreviousChapterPreloading =
isPreviousChapterLastLeadingChapter && visibleChapters.isLeadingChapterPreloadMode;