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

This commit is contained in:
ItsLogic 2022-04-24 20:21:21 +01:00 committed by GitHub
parent 08e63e5fab
commit 5e32b8e49f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,9 +66,14 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
set(value) { set(value) {
field = value field = value
if (value) { if (value) {
awaitingIdleViewerChapters?.let { awaitingIdleViewerChapters?.let { viewerChapters ->
setChaptersInternal(it) setChaptersInternal(viewerChapters)
awaitingIdleViewerChapters = null awaitingIdleViewerChapters = null
if (viewerChapters.currChapter.pages?.size == 1) {
adapter.nextTransition?.to?.let {
activity.requestPreloadChapter(it)
}
}
} }
} }
} }