Make sure UI and state is in sync

This commit is contained in:
topjohnwu 2022-08-23 05:38:19 -07:00
parent 727c70005e
commit f8395a7dc6
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ class PolicyRvItem(
var isEnabled
get() = item.policy == SuPolicy.ALLOW
set(value) = setImpl(value, isEnabled) {
notifyPropertyChanged(BR.enabled)
viewModel.togglePolicy(this, value)
}