diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt index 3f6464b99..9c59503a8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt @@ -158,8 +158,8 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer { Timber.d("onReaderPageSelected: ${page.number}/${pages.size}") activity.onPageSelected(page) - // Preload next chapter once we're within the last 3 pages of the current chapter - val inPreloadRange = pages.size - page.number < 3 + // Preload next chapter once we're within the last 5 pages of the current chapter + val inPreloadRange = pages.size - page.number < 5 if (inPreloadRange && allowPreload && page.chapter == adapter.currentChapter) { Timber.d("Request preload next chapter because we're at page ${page.number} of ${pages.size}") adapter.nextTransition?.to?.let { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt index baf7d898c..04728422b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt @@ -167,8 +167,8 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr Timber.d("onPageSelected: ${page.number}/${pages.size}") activity.onPageSelected(page) - // Preload next chapter once we're within the last 3 pages of the current chapter - val inPreloadRange = pages.size - page.number < 3 + // Preload next chapter once we're within the last 5 pages of the current chapter + val inPreloadRange = pages.size - page.number < 5 if (inPreloadRange && allowPreload && page.chapter == adapter.currentChapter) { Timber.d("Request preload next chapter because we're at page ${page.number} of ${pages.size}") val nextItem = adapter.items.getOrNull(adapter.items.size - 1)