mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Apply natural sort to local manga pages in Directory format (#826)
This commit is contained in:
@@ -328,8 +328,8 @@ class LocalSource(
|
||||
return when (val format = getFormat(chapter)) {
|
||||
is Format.Directory -> {
|
||||
format.file.listFiles().orEmpty()
|
||||
.sortedBy { it.name }
|
||||
.filter { !it.isDirectory && ImageUtil.isImage(it.name, it::inputStream) }
|
||||
.sortedWith { f1, f2 -> f1.name.compareToCaseInsensitiveNaturalOrder(f2.name) }
|
||||
.mapIndexed { index, page ->
|
||||
Page(
|
||||
index,
|
||||
|
||||
Reference in New Issue
Block a user