mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-30 21:45:27 +00:00
Fixed items in superuser not disappearing when deleted
This commit is contained in:
parent
7640246255
commit
52eb059515
@ -62,7 +62,10 @@ class SuperuserViewModel(
|
|||||||
|
|
||||||
fun deletePressed(item: PolicyRvItem) {
|
fun deletePressed(item: PolicyRvItem) {
|
||||||
fun updateState() = deletePolicy(item.item)
|
fun updateState() = deletePolicy(item.item)
|
||||||
.subscribeK { items.remove(item) }
|
.map { items.filterIsInstance<PolicyRvItem>().toMutableList() }
|
||||||
|
.map { it.removeAll { it.item.packageName == item.item.packageName }; it }
|
||||||
|
.map { it to items.calculateDiff(it) }
|
||||||
|
.subscribeK { items.update(it.first, it.second) }
|
||||||
.add()
|
.add()
|
||||||
|
|
||||||
withView {
|
withView {
|
||||||
|
Loading…
Reference in New Issue
Block a user