Fix reader chapter sort ordering (fixes #5157)
This commit is contained in:
parent
986b709f2c
commit
065cf42aea
@ -125,7 +125,7 @@ class ReaderPresenter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
chaptersForReader
|
chaptersForReader
|
||||||
.sortedWith(getChapterSort(manga))
|
.sortedWith(getChapterSort(manga, sortDescending = false))
|
||||||
.map(::ReaderChapter)
|
.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.Chapter
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
|
|
||||||
fun getChapterSort(manga: Manga): (Chapter, Chapter) -> Int {
|
fun getChapterSort(manga: Manga, sortDescending: Boolean = manga.sortDescending()): (Chapter, Chapter) -> Int {
|
||||||
val sortDescending = manga.sortDescending()
|
|
||||||
|
|
||||||
return when (manga.sorting) {
|
return when (manga.sorting) {
|
||||||
Manga.CHAPTER_SORTING_SOURCE -> when (sortDescending) {
|
Manga.CHAPTER_SORTING_SOURCE -> when (sortDescending) {
|
||||||
true -> { c1, c2 -> c1.source_order.compareTo(c2.source_order) }
|
true -> { c1, c2 -> c1.source_order.compareTo(c2.source_order) }
|
||||||
|
Loading…
Reference in New Issue
Block a user