maybe some fixes to chapters showing blank after exiting the reader

hard to fix what i cant reproduce you know
This commit is contained in:
Jays2Kings 2022-05-08 12:18:41 -04:00
parent 68f3e6765d
commit 9dd0cac812
2 changed files with 5 additions and 1 deletions

View file

@ -583,11 +583,14 @@ class MangaDetailsController :
if (!returningFromReader) return
returningFromReader = false
runBlocking {
val itemAnimator = binding.recycler.itemAnimator
val chapters =
withTimeoutOrNull(1000) { presenter.getChaptersNow() } ?: return@runBlocking
binding.recycler.itemAnimator = null
tabletAdapter?.notifyItemChanged(0)
adapter?.setChapters(chapters)
addMangaHeader()
binding.recycler.itemAnimator = itemAnimator
}
}

View file

@ -312,7 +312,8 @@ class PagerViewerAdapter(private val viewer: PagerViewer) : ViewPagerAdapter() {
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
it.from.chapter.id == lastPage.chapter.chapter.id
} else true
)
) {
subJoinedItems.add(Pair(it, null))