Sort policy with app name

This commit is contained in:
topjohnwu 2019-06-07 01:24:54 -07:00
parent cec017b7bf
commit 3f3b1f5b1d

View File

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