Fix "is read" detection in single/double page mode

In case the last page of a manga was immediately visible or the became visible after the "image spread state" change, the chapter never got marked as read
This commit is contained in:
schroda
2024-12-12 13:21:48 +01:00
parent 9a8655db2f
commit d00c930598
2 changed files with 1 additions and 5 deletions

View File

@@ -138,6 +138,7 @@ export const ReaderViewer = forwardRef((_, ref: ForwardedRef<HTMLDivElement | nu
const convertPagesToDoublePageMode = readingMode.value === ReadingMode.DOUBLE_PAGE;
if (convertPagesToDoublePageMode) {
updateCurrentPageIndex(getNextIndexFromPage(getPage(currentPageIndex, actualPages)));
setPages(actualPages);
setWasDoublePageMode(readingMode.value === ReadingMode.DOUBLE_PAGE);
}

View File

@@ -375,11 +375,6 @@ export class ReaderControls {
return;
}
const hasPageIndexChanged = endReached || pageIndex !== currentPageIndex;
if (!hasPageIndexChanged) {
return;
}
ReaderService.downloadAhead(currentChapter, nextChapter, nextChapters, pageIndex, downloadAheadLimit);
const handleCurrentPageIndexChange = () => {