mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-23 21:27:40 +03:00
Consider sort direction when resuming (fixes #4909)
This commit is contained in:
parent
6676490e09
commit
8882cd4787
1 changed files with 6 additions and 1 deletions
|
@ -474,7 +474,12 @@ 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.sortedWith(getChapterSort()).findLast { !it.read }
|
val chapters = chapters.sortedWith(getChapterSort())
|
||||||
|
return if (sortDescending()) {
|
||||||
|
return chapters.findLast { !it.read }
|
||||||
|
} else {
|
||||||
|
chapters.find { !it.read }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue