Fix crash on E-Hentai when pressing the FAB when the chapters havent loaded yet
This commit is contained in:
parent
a6cba5c87d
commit
2c49466a42
@ -644,7 +644,7 @@ class MangaPresenter(
|
||||
*/
|
||||
fun getNextUnreadChapter(): ChapterItem? {
|
||||
return if (source.isEhBasedSource()) {
|
||||
chapters.sortedBy { it.source_order }[0]
|
||||
chapters.sortedBy { it.source_order }.getOrNull(0)
|
||||
} else {
|
||||
chapters.sortedByDescending { it.source_order }.find { !it.read }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user