simplify denylist rm

This commit is contained in:
vvb2060 2022-09-15 00:44:49 +08:00 committed by John Wu
parent 3ff60ed49f
commit 13c2695e98

View File

@ -44,9 +44,18 @@ class DenyListRvItem(
processes
.filterNot { it.isEnabled }
.filter { isExpanded || it.defaultSelection }
.forEach { it.toggle() }
} else {
processes.filter { it.isEnabled }
}.forEach { it.toggle() }
Shell.cmd("magisk --denylist rm ${info.packageName}").submit()
processes.filter { it.isEnabled }.forEach {
if (it.process.isIsolated) {
it.toggle()
} else {
it.isEnabled = !it.isEnabled
notifyPropertyChanged(BR.enabled)
}
}
}
}
init {