Fix history not showing the next unread chapter after returning to the controller

This commit is contained in:
Jays2Kings 2023-03-04 17:57:58 -05:00
parent 982cbc42fd
commit 80732700fc

View file

@ -275,12 +275,12 @@ class RecentsPresenter(
(it.chapter.read && viewType != VIEW_TYPE_ONLY_UPDATES) || it.chapter.id == null -> {
val unreadChapterIsAlreadyInList by lazy {
val fIndex = mangaList.indexOfFirst { item -> item.manga.id == it.manga.id }
(
recentItems.any { item -> item.mch.manga.id == it.manga.id } ||
fIndex < mangaList.indexOf(it)
)
}
if (viewType == VIEW_TYPE_ONLY_HISTORY && unreadChapterIsAlreadyInList) {
if (viewType == VIEW_TYPE_ONLY_HISTORY && updatePageCount &&
unreadChapterIsAlreadyInList
) {
it.chapter
} else {
val nextChapter = getNextChapter(it.manga)