From 4cdead8006ac07ff34763ec9ddd4306817948cfd Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+antsylich@users.noreply.github.com> Date: Sun, 27 Jul 2025 22:21:55 +0545 Subject: [PATCH] Make local source default chapter sorting match file explorer behavior Closes #2225 (cherry picked from commit 7f56555d632508379037eb0fba4411079c27ad5b) --- .../androidMain/kotlin/tachiyomi/source/local/LocalSource.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt b/source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt index 891a0b22b..b8d3e6603 100755 --- a/source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt +++ b/source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt @@ -352,8 +352,7 @@ actual class LocalSource( } } .sortedWith { c1, c2 -> - val c = c2.chapter_number.compareTo(c1.chapter_number) - if (c == 0) c2.name.compareToCaseInsensitiveNaturalOrder(c1.name) else c + c2.name.compareToCaseInsensitiveNaturalOrder(c1.name) } // Copy the cover from the first chapter found if not available