mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
fix #1427, properly handle diacritics at sorting
This commit is contained in:
parent
f3e76cfb50
commit
581dd43bd6
2 changed files with 4 additions and 4 deletions
|
@ -139,9 +139,9 @@ fun Context.getSortedDirectories(source: ArrayList<Directory>): ArrayList<Direct
|
|||
}
|
||||
|
||||
if (sorting and SORT_USE_NUMERIC_VALUE != 0) {
|
||||
AlphanumericComparator().compare(o1.sortValue.toLowerCase(), o2.sortValue.toLowerCase())
|
||||
AlphanumericComparator().compare(o1.sortValue.normalizeString().toLowerCase(), o2.sortValue.normalizeString().toLowerCase())
|
||||
} else {
|
||||
o1.sortValue.toLowerCase().compareTo(o2.sortValue.toLowerCase())
|
||||
o1.sortValue.normalizeString().toLowerCase().compareTo(o2.sortValue.normalizeString().toLowerCase())
|
||||
}
|
||||
}
|
||||
sorting and SORT_BY_PATH != 0 -> {
|
||||
|
|
|
@ -761,9 +761,9 @@ class MediaFetcher(val context: Context) {
|
|||
var result = when {
|
||||
sorting and SORT_BY_NAME != 0 -> {
|
||||
if (sorting and SORT_USE_NUMERIC_VALUE != 0) {
|
||||
AlphanumericComparator().compare(o1.name.toLowerCase(), o2.name.toLowerCase())
|
||||
AlphanumericComparator().compare(o1.name.normalizeString().toLowerCase(), o2.name.normalizeString().toLowerCase())
|
||||
} else {
|
||||
o1.name.toLowerCase().compareTo(o2.name.toLowerCase())
|
||||
o1.name.normalizeString().toLowerCase().compareTo(o2.name.normalizeString().toLowerCase())
|
||||
}
|
||||
}
|
||||
sorting and SORT_BY_PATH != 0 -> {
|
||||
|
|
Loading…
Reference in a new issue