feat(app-selector): show patchable installed apps first (#1496)

This commit is contained in:
aAbed 2023-12-14 16:35:14 +05:45 committed by oSumAtrIX
parent a22ef4d9b8
commit 7f67a86413
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -80,7 +80,9 @@ class PM(
(compatibleApps.await() + installedApps.await())
.distinctBy { it.packageName }
.sortedWith(
compareByDescending<AppInfo> {
compareByDescending<AppInfo>{
it.packageInfo != null && (it.patches ?: 0) > 0
}.thenByDescending {
it.patches
}.thenBy {
it.packageInfo?.label()