Make the resume/start button go to the latest version for EH manga

This commit is contained in:
Jobobby04 2020-07-19 14:48:58 -04:00
parent 78d1a6cecb
commit 4513af8425

View File

@ -623,7 +623,11 @@ class MangaPresenter(
* Returns the next unread chapter or null if everything is read. * Returns the next unread chapter or null if everything is read.
*/ */
fun getNextUnreadChapter(): ChapterItem? { fun getNextUnreadChapter(): ChapterItem? {
return chapters.sortedByDescending { it.source_order }.find { !it.read } return if (source.isEhBasedSource()) {
chapters.sortedBy { it.source_order }[0]
} else {
chapters.sortedByDescending { it.source_order }.find { !it.read }
}
} }
/** /**