Handle single page chapters for download ahead

This commit is contained in:
schroda
2025-01-16 14:07:21 +01:00
parent 22011d4d6d
commit 92f64ef009

View File

@@ -104,7 +104,7 @@ export const getChapterIdsForDownloadAhead = (
}
const isDownloadAheadEnabled = !!downloadAheadLimit;
const inDownloadRange = currentPageIndex / chapterUpToDateData.pageCount > 0.25;
const inDownloadRange = (currentPageIndex + 1) / chapterUpToDateData.pageCount > 0.25;
const shouldCheckDownloadAhead = isDownloadAheadEnabled && chapterUpToDateData.isDownloaded && inDownloadRange;
if (!shouldCheckDownloadAhead) {
return [];