removing the extra compare step at sorting
This commit is contained in:
parent
293d8a7390
commit
93907c54b4
2 changed files with 0 additions and 8 deletions
|
@ -170,10 +170,6 @@ fun Context.getSortedDirectories(source: ArrayList<Directory>): ArrayList<Direct
|
||||||
else -> o1.taken.compareTo(o2.taken)
|
else -> o1.taken.compareTo(o2.taken)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == 0) {
|
|
||||||
result = AlphanumericComparator().compare(o1.path.toLowerCase(), o2.path.toLowerCase())
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sorting and SORT_DESCENDING != 0) {
|
if (sorting and SORT_DESCENDING != 0) {
|
||||||
result *= -1
|
result *= -1
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,10 +366,6 @@ class MediaFetcher(val context: Context) {
|
||||||
else -> o1.taken.compareTo(o2.taken)
|
else -> o1.taken.compareTo(o2.taken)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == 0) {
|
|
||||||
result = AlphanumericComparator().compare(o1.path.toLowerCase(), o2.path.toLowerCase())
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sorting and SORT_DESCENDING != 0) {
|
if (sorting and SORT_DESCENDING != 0) {
|
||||||
result *= -1
|
result *= -1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue