mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-17 04:20:38 +01:00
removing the extra compare step at sorting
This commit is contained in:
parent
293d8a7390
commit
93907c54b4
@ -170,10 +170,6 @@ fun Context.getSortedDirectories(source: ArrayList<Directory>): ArrayList<Direct
|
||||
else -> o1.taken.compareTo(o2.taken)
|
||||
}
|
||||
|
||||
if (result == 0) {
|
||||
result = AlphanumericComparator().compare(o1.path.toLowerCase(), o2.path.toLowerCase())
|
||||
}
|
||||
|
||||
if (sorting and SORT_DESCENDING != 0) {
|
||||
result *= -1
|
||||
}
|
||||
|
@ -366,10 +366,6 @@ class MediaFetcher(val context: Context) {
|
||||
else -> o1.taken.compareTo(o2.taken)
|
||||
}
|
||||
|
||||
if (result == 0) {
|
||||
result = AlphanumericComparator().compare(o1.path.toLowerCase(), o2.path.toLowerCase())
|
||||
}
|
||||
|
||||
if (sorting and SORT_DESCENDING != 0) {
|
||||
result *= -1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user