diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt index 6f555b0fb..2342c5da2 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt @@ -55,6 +55,12 @@ class SuperuserViewModel( .flattenAsFlowable { it } .map { PolicyRvItem(it, it.applicationInfo.loadIcon(packageManager)) } .toList() + .map { + it.sortedWith(compareBy( + { it.item.appName.toLowerCase() }, + { it.item.packageName } + )) + } .applySchedulers() .applyViewModel(this) .subscribeK { items.update(it) }