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 GitHub
parent a8b9d9316f
commit d55abf5dda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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