From 8696ed8f36b2fa99fffdf02b2b7fb2b19300b67f Mon Sep 17 00:00:00 2001 From: rifsxd Date: Fri, 14 Feb 2025 19:34:46 +0600 Subject: [PATCH] Revert "manager: fix umountModule toggle not showing as enabled after manager restart" This reverts commit 682f93667b2266fbf17cf17478b4950ac6acb57d. --- .../java/com/rifsxd/ksunext/ui/screen/Settings.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 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 a665a976..a19078d3 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 @@ -154,17 +154,10 @@ fun SettingScreen(navigator: DestinationsNavigator) { ) } - val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE) - var umountChecked by rememberSaveable { - mutableStateOf(false) + mutableStateOf(Natives.isDefaultUmountModules()) } if (ksuVersion != null) { - - LaunchedEffect(Unit) { - umountChecked = Natives.isDefaultUmountModules() - } - SwitchItem( icon = Icons.Filled.RemoveModerator, title = stringResource(id = R.string.settings_umount_modules_default), @@ -177,6 +170,8 @@ fun SettingScreen(navigator: DestinationsNavigator) { } } + val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE) + val suSFS = getSuSFS() val isSUS_SU = getSuSFSFeatures() if (suSFS == "Supported") {