Browse Source

Fix chapter transition setting for one page chapters (#6998)

(cherry picked from commit 5e32b8e49fc7879559366357743bc450099453ca)
ItsLogic 2 years ago
parent
commit
615b01a006

+ 7 - 2
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)
+                        }
+                    }
                 }
             }
         }