diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt index 7f26c85fc3..9990b916de 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt @@ -182,6 +182,9 @@ 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()?.chapter?.chapter?.id != it.chapter.chapter.id) { + pagedItems.add(mutableListOf()) + } pagedItems.last().add(it) } else { otherItems.add(it)