Fix chapter transistion in the wrong place in double page layout

only occurs if double page is on, always show transitions is off, you go to the next chapter then go back
This commit is contained in:
Jays2Kings 2022-05-08 12:13:15 -04:00
parent 10a8c9167b
commit 68f3e6765d

View file

@ -309,8 +309,15 @@ class PagerViewerAdapter(private val viewer: PagerViewer) : ViewPagerAdapter() {
)
}
otherItems.getOrNull(pagedIndex)?.let {
subJoinedItems.add(Pair(it, null))
pagedIndex++
val lastPage = subJoinedItems.lastOrNull()?.first as? ReaderPage
if (lastPage == null || (
if (it is ChapterTransition.Next) {
it.from.chapter.id == lastPage.chapter.chapter.id } else true
)
) {
subJoinedItems.add(Pair(it, null))
pagedIndex++
}
}
}
if (viewer is R2LPagerViewer) {