From 5e32b8e49fc7879559366357743bc450099453ca Mon Sep 17 00:00:00 2001 From: ItsLogic <38233332+ItsLogic@users.noreply.github.com> Date: Sun, 24 Apr 2022 20:21:21 +0100 Subject: [PATCH] Fix chapter transition setting for one page chapters (#6998) --- .../tachiyomi/ui/reader/viewer/pager/PagerViewer.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 8322285d2b..364740fad4 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 @@ -66,9 +66,14 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer { set(value) { field = value if (value) { - awaitingIdleViewerChapters?.let { - setChaptersInternal(it) + awaitingIdleViewerChapters?.let { viewerChapters -> + setChaptersInternal(viewerChapters) awaitingIdleViewerChapters = null + if (viewerChapters.currChapter.pages?.size == 1) { + adapter.nextTransition?.to?.let { + activity.requestPreloadChapter(it) + } + } } } }