Fix sorting by lastUpdated in MyApps

This commit is contained in:
Torsten Grote
2026-05-21 09:54:44 -03:00
parent 526cb80e8d
commit c02281a14d

View File

@@ -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)