From f8395a7dc62ae59b6abf8455c8025b1bdb7f1d90 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 23 Aug 2022 05:38:19 -0700 Subject: [PATCH] Make sure UI and state is in sync --- .../main/java/com/topjohnwu/magisk/ui/superuser/PolicyRvItem.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/PolicyRvItem.kt b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/PolicyRvItem.kt index dd587ad70..124665cb8 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/PolicyRvItem.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/PolicyRvItem.kt @@ -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) }