Commit b25c4972 authored by topjohnwu's avatar topjohnwu

Sort hidden items on the top

parent b245782c
package com.topjohnwu.magisk.model.entity.state
enum class IndeterminateState {
INDETERMINATE, CHECKED, UNCHECKED
}
\ No newline at end of file
CHECKED, INDETERMINATE, UNCHECKED
}
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment