Commit f8395a7d authored by topjohnwu's avatar topjohnwu

Make sure UI and state is in sync

parent 727c7000
...@@ -36,6 +36,7 @@ class PolicyRvItem( ...@@ -36,6 +36,7 @@ class PolicyRvItem(
var isEnabled var isEnabled
get() = item.policy == SuPolicy.ALLOW get() = item.policy == SuPolicy.ALLOW
set(value) = setImpl(value, isEnabled) { set(value) = setImpl(value, isEnabled) {
notifyPropertyChanged(BR.enabled)
viewModel.togglePolicy(this, value) viewModel.togglePolicy(this, value)
} }
......
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