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 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()
|
||||
|
||||
withView {
|
||||
|
Loading…
Reference in New Issue
Block a user