From 6100df6f8c019eaf09fb84d681e057ec22bff4d9 Mon Sep 17 00:00:00 2001 From: rifsxd Date: Mon, 24 Feb 2025 20:32:46 +0600 Subject: [PATCH] manager: remove redundant enabled state check in SettingScreen --- .../app/src/main/java/com/rifsxd/ksunext/ui/screen/Settings.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Settings.kt b/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Settings.kt index eebbac70..7b1212e2 100644 --- a/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Settings.kt +++ b/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Settings.kt @@ -178,8 +178,7 @@ fun SettingScreen(navigator: DestinationsNavigator) { icon = Icons.Filled.RemoveModerator, title = stringResource(id = R.string.settings_disable_su), summary = stringResource(id = R.string.settings_disable_su_summary), - checked = isSuDisabled, - enabled = !isSuDisabled // we can't re-enable su if it's disabled. + checked = isSuDisabled ) { checked -> val shouldEnable = !checked if (Natives.setSuEnabled(shouldEnable)) {