Fix reader chapter sort ordering (fixes #5157)
This commit is contained in:
parent
986b709f2c
commit
065cf42aea
2 changed files with 2 additions and 4 deletions
|
@ -125,7 +125,7 @@ class ReaderPresenter(
|
|||
}
|
||||
|
||||
chaptersForReader
|
||||
.sortedWith(getChapterSort(manga))
|
||||
.sortedWith(getChapterSort(manga, sortDescending = false))
|
||||
.map(::ReaderChapter)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.kanade.tachiyomi.util.chapter
|
|||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
|
||||
fun getChapterSort(manga: Manga): (Chapter, Chapter) -> Int {
|
||||
val sortDescending = manga.sortDescending()
|
||||
|
||||
fun getChapterSort(manga: Manga, sortDescending: Boolean = manga.sortDescending()): (Chapter, Chapter) -> Int {
|
||||
return when (manga.sorting) {
|
||||
Manga.CHAPTER_SORTING_SOURCE -> when (sortDescending) {
|
||||
true -> { c1, c2 -> c1.source_order.compareTo(c2.source_order) }
|
||||
|
|
Reference in a new issue