Commit 52eb0595 authored by Viktor De Pasquale's avatar Viktor De Pasquale

Fixed items in superuser not disappearing when deleted

parent 76402462
......@@ -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 {
......
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