sort media/directories by path, if the original sorting result is equal
This commit is contained in:
parent
96d839cd8c
commit
944372deda
|
@ -170,6 +170,10 @@ 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
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,6 +364,10 @@ 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 New Issue