manager: fix umountModule toggle not showing as enabled after manager restart

This commit is contained in:
rifsxd
2025-02-14 12:52:44 +06:00
parent 00cab2209e
commit 682f93667b

View File

@@ -154,10 +154,17 @@ fun SettingScreen(navigator: DestinationsNavigator) {
)
}
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
var umountChecked by rememberSaveable {
mutableStateOf(false)
}
if (ksuVersion != null) {
LaunchedEffect(Unit) {
umountChecked = Natives.isDefaultUmountModules()
}
SwitchItem(
icon = Icons.Filled.RemoveModerator,
title = stringResource(id = R.string.settings_umount_modules_default),
@@ -170,8 +177,6 @@ fun SettingScreen(navigator: DestinationsNavigator) {
}
}
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
val suSFS = getSuSFS()
val isSUS_SU = getSuSFSFeatures()
if (suSFS == "Supported") {