mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 21:01:50 +01:00
Increase next chapter preload threshold to last 5 pages
This commit is contained in:
parent
916c1c9de2
commit
5059c6295f
@ -158,8 +158,8 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
|
|||||||
Timber.d("onReaderPageSelected: ${page.number}/${pages.size}")
|
Timber.d("onReaderPageSelected: ${page.number}/${pages.size}")
|
||||||
activity.onPageSelected(page)
|
activity.onPageSelected(page)
|
||||||
|
|
||||||
// Preload next chapter once we're within the last 3 pages of the current chapter
|
// Preload next chapter once we're within the last 5 pages of the current chapter
|
||||||
val inPreloadRange = pages.size - page.number < 3
|
val inPreloadRange = pages.size - page.number < 5
|
||||||
if (inPreloadRange && allowPreload && page.chapter == adapter.currentChapter) {
|
if (inPreloadRange && allowPreload && page.chapter == adapter.currentChapter) {
|
||||||
Timber.d("Request preload next chapter because we're at page ${page.number} of ${pages.size}")
|
Timber.d("Request preload next chapter because we're at page ${page.number} of ${pages.size}")
|
||||||
adapter.nextTransition?.to?.let {
|
adapter.nextTransition?.to?.let {
|
||||||
|
@ -167,8 +167,8 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr
|
|||||||
Timber.d("onPageSelected: ${page.number}/${pages.size}")
|
Timber.d("onPageSelected: ${page.number}/${pages.size}")
|
||||||
activity.onPageSelected(page)
|
activity.onPageSelected(page)
|
||||||
|
|
||||||
// Preload next chapter once we're within the last 3 pages of the current chapter
|
// Preload next chapter once we're within the last 5 pages of the current chapter
|
||||||
val inPreloadRange = pages.size - page.number < 3
|
val inPreloadRange = pages.size - page.number < 5
|
||||||
if (inPreloadRange && allowPreload && page.chapter == adapter.currentChapter) {
|
if (inPreloadRange && allowPreload && page.chapter == adapter.currentChapter) {
|
||||||
Timber.d("Request preload next chapter because we're at page ${page.number} of ${pages.size}")
|
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)
|
val nextItem = adapter.items.getOrNull(adapter.items.size - 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user