mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-27 17:49:16 +03:00
Increase next chapter preload threshold to last 5 pages
This commit is contained in:
parent
916c1c9de2
commit
5059c6295f
2 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue