Sort hidden items on the top

This commit is contained in:
topjohnwu
2019-05-02 06:38:42 -04:00
parent b245782c7e
commit b25c49725f
2 changed files with 4 additions and 3 deletions
@@ -73,7 +73,8 @@ class HideViewModel(
.filter { it.processes.isNotEmpty() }
.map { HideRvItem(it, hideTargets.blockingGet()) }
.toList()
.map { it.sortBy { it.item.info.name }; it }
.map { it.sortWith(compareBy(
{it.isHiddenState.value}, {it.item.info.name}, {it.packageName})); it }
.doOnSuccess { allItems.update(it) }
.flatMap { queryRaw() }
.applyViewModel(this)