manager: remove redundant enabled state check in SettingScreen

This commit is contained in:
rifsxd
2025-02-24 20:32:46 +06:00
parent e597bd1c66
commit 6100df6f8c

View File

@@ -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)) {