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);
}