Follow chapter sort setting for start/resume FAB (closes #1716)
(cherry picked from commit f7cc36f2f00ff8bcc690a0e5e94b1464f014e3b6) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt
This commit is contained in:
parent
22b8f51fa3
commit
2220b6a91d
@ -892,10 +892,9 @@ class MangaPresenter(
|
||||
*/
|
||||
fun getNextUnreadChapter(): ChapterItem? {
|
||||
return if (source.isEhBasedSource()) {
|
||||
val chapter = chapters.sortedBy { it.source_order }.getOrNull(0)
|
||||
if (chapter?.read == false) chapter else null
|
||||
chapters.sortedWith(getChapterSort()).lastOrNull()?.takeUnless { it.read }
|
||||
} else {
|
||||
chapters.sortedByDescending { it.source_order }.find { !it.read }
|
||||
chapters.sortedWith(getChapterSort()).findLast { !it.read }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user