speed up file sorting, potentially creating minor inconsistencies

This commit is contained in:
tibbi 2019-01-04 22:54:24 +01:00
parent fe9d34295a
commit 4b748b1c99

View file

@ -369,11 +369,6 @@ class MediaFetcher(val context: Context) {
else -> o1.taken.compareTo(o2.taken) else -> o1.taken.compareTo(o2.taken)
} }
// do just a quick extra sorting if the original sorting is equal, does not need to be accurate in all cases
if (result == 0 && sorting and SORT_BY_NAME == 0 && sorting and SORT_BY_PATH == 0) {
result = o1.name.compareTo(o2.name)
}
if (sorting and SORT_DESCENDING != 0) { if (sorting and SORT_DESCENDING != 0) {
result *= -1 result *= -1
} }