Fix marking chapter as read for single page chapters in paged pagers

Regression from 174d850093
This commit is contained in:
schroda
2025-02-15 22:55:41 +01:00
parent cc7eca08d7
commit 10ad7ce5d7
2 changed files with 2 additions and 2 deletions

View File

@@ -49,6 +49,6 @@ export const useReaderHandlePageSelection = (
const isLastPage = newPageIndex === totalPages - 1; const isLastPage = newPageIndex === totalPages - 1;
setPageToScrollToIndex(null); setPageToScrollToIndex(null);
updateCurrentPageIndex(newPageIndex, !isLastPage); updateCurrentPageIndex(newPageIndex, !isLastPage, isLastPage);
}, [pageToScrollToIndex]); }, [pageToScrollToIndex]);
}; };

View File

@@ -473,7 +473,7 @@ export class ReaderControls {
return useCallback( return useCallback(
(pageIndex, debounceChapterUpdate = true, endReached = false) => { (pageIndex, debounceChapterUpdate = true, endReached = false) => {
if (pageIndex === currentPageIndex) { if (pageIndex === currentPageIndex && !endReached) {
return; return;
} }