mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 08:37:39 +00:00
Fixed policy toggle being impossible to cancel
This commit is contained in:
parent
a30f5b175f
commit
d8d72f92b3
@ -42,6 +42,11 @@ class SuperuserViewModel(
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
rxBus.register<PolicyEnableEvent>()
|
rxBus.register<PolicyEnableEvent>()
|
||||||
|
.filter {
|
||||||
|
val isIgnored = it.item == ignoreNext
|
||||||
|
if (isIgnored) ignoreNext = null
|
||||||
|
!isIgnored
|
||||||
|
}
|
||||||
.subscribeK { togglePolicy(it.item, it.enable) }
|
.subscribeK { togglePolicy(it.item, it.enable) }
|
||||||
.add()
|
.add()
|
||||||
rxBus.register<PolicyUpdateEvent>()
|
rxBus.register<PolicyUpdateEvent>()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user