Make local source default chapter sorting match file explorer behavior

Closes #2225
This commit is contained in:
AntsyLich
2025-07-27 22:36:55 +06:00
parent 8636b7a685
commit 7f56555d63
2 changed files with 2 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- Changed log in button text when processing tracker login ([@AntsyLich](https://github.com/AntsyLich)) ([#2069](https://github.com/mihonapp/mihon/pull/2069)) - Changed log in button text when processing tracker login ([@AntsyLich](https://github.com/AntsyLich)) ([#2069](https://github.com/mihonapp/mihon/pull/2069))
- Disable reader's 'Keep screen on' setting by default ([@AntsyLich](https://github.com/AntsyLich)) ([#2095](https://github.com/mihonapp/mihon/pull/2095)) - Disable reader's 'Keep screen on' setting by default ([@AntsyLich](https://github.com/AntsyLich)) ([#2095](https://github.com/mihonapp/mihon/pull/2095))
- Update manga without chapters even if restricted by source ([@AntsyLich](https://github.com/AntsyLich)) ([#2224](https://github.com/mihonapp/mihon/pull/224)) - Update manga without chapters even if restricted by source ([@AntsyLich](https://github.com/AntsyLich)) ([#2224](https://github.com/mihonapp/mihon/pull/224))
- Make local source default chapter sorting match file explorer behavior ([@AntsyLich](https://github.com/AntsyLich)) ([#2224](https://github.com/mihonapp/mihon/pull/224))
### Fixes ### Fixes
- Fix Bangumi search results including novels ([@MajorTanya](https://github.com/MajorTanya)) ([#1885](https://github.com/mihonapp/mihon/pull/1885)) - Fix Bangumi search results including novels ([@MajorTanya](https://github.com/MajorTanya)) ([#1885](https://github.com/mihonapp/mihon/pull/1885))

View File

@@ -261,8 +261,7 @@ actual class LocalSource(
} }
} }
.sortedWith { c1, c2 -> .sortedWith { c1, c2 ->
val c = c2.chapter_number.compareTo(c1.chapter_number) c2.name.compareToCaseInsensitiveNaturalOrder(c1.name)
if (c == 0) c2.name.compareToCaseInsensitiveNaturalOrder(c1.name) else c
} }
// Copy the cover from the first chapter found if not available // Copy the cover from the first chapter found if not available