From d55abf5ddacb37dcda48f93a5f86befbb50cf48f Mon Sep 17 00:00:00 2001 From: aAbed <39409020+TheAabedKhan@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:35:14 +0545 Subject: [PATCH] feat(app-selector): show patchable installed apps first (#1496) --- app/src/main/java/app/revanced/manager/util/PM.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/revanced/manager/util/PM.kt b/app/src/main/java/app/revanced/manager/util/PM.kt index 12a91a6c..21a60b97 100644 --- a/app/src/main/java/app/revanced/manager/util/PM.kt +++ b/app/src/main/java/app/revanced/manager/util/PM.kt @@ -80,7 +80,9 @@ class PM( (compatibleApps.await() + installedApps.await()) .distinctBy { it.packageName } .sortedWith( - compareByDescending { + compareByDescending{ + it.packageInfo != null && (it.patches ?: 0) > 0 + }.thenByDescending { it.patches }.thenBy { it.packageInfo?.label()