Fixed double page layout showing pages from other chapters
(cherry picked from commit 8ac340eff0451e59a1fdfeb3577c38db5eb7da00)
This commit is contained in:
parent
f9ba8b0072
commit
60f1c6a2b4
@ -231,6 +231,11 @@ class PagerViewerAdapter(private val viewer: PagerViewer) : ViewPagerAdapter() {
|
||||
// Step 1: segment the pages and transition pages
|
||||
subItems.forEach {
|
||||
if (it is ReaderPage) {
|
||||
if (pagedItems.last().lastOrNull() != null &&
|
||||
pagedItems.last().last()?.chapter?.chapter?.id != it.chapter.chapter.id
|
||||
) {
|
||||
pagedItems.add(mutableListOf())
|
||||
}
|
||||
pagedItems.last().add(it)
|
||||
} else {
|
||||
otherItems.add(it)
|
||||
|
Loading…
x
Reference in New Issue
Block a user