mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-06-16 11:50:09 -04:00
Fix sorting by lastUpdated in MyApps
This commit is contained in:
@@ -121,7 +121,7 @@ private fun <T : MyAppItem> List<T>.sort(sortOrder: AppListSortOrder): List<T> {
|
||||
}
|
||||
AppListSortOrder.LAST_UPDATED -> {
|
||||
sortedWith { a1, a2 ->
|
||||
val lastAddedCompare = a1.lastUpdated.compareTo(a2.lastUpdated)
|
||||
val lastAddedCompare = a2.lastUpdated.compareTo(a1.lastUpdated)
|
||||
if (lastAddedCompare == 0) {
|
||||
// fall-back to name if last updated is the same, to ensure stable sorting
|
||||
collator.compare(a1.name, a2.name)
|
||||
|
||||
Reference in New Issue
Block a user