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 processes
.filterNot { it.isEnabled } .filterNot { it.isEnabled }
.filter { isExpanded || it.defaultSelection } .filter { isExpanded || it.defaultSelection }
.forEach { it.toggle() }
} else { } else {
processes.filter { it.isEnabled } Shell.cmd("magisk --denylist rm ${info.packageName}").submit()
}.forEach { it.toggle() } processes.filter { it.isEnabled }.forEach {
if (it.process.isIsolated) {
it.toggle()
} else {
it.isEnabled = !it.isEnabled
notifyPropertyChanged(BR.enabled)
}
}
}
} }
init { init {