You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
manager: remove beta warning for mount system switch
This commit is contained in:
@@ -220,8 +220,6 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val hasShownWarning = rememberSaveable { mutableStateOf(prefs.getBoolean("has_shown_warning", false)) }
|
|
||||||
|
|
||||||
var useOverlayFs by rememberSaveable {
|
var useOverlayFs by rememberSaveable {
|
||||||
mutableStateOf(
|
mutableStateOf(
|
||||||
prefs.getBoolean("use_overlay_fs", false)
|
prefs.getBoolean("use_overlay_fs", false)
|
||||||
@@ -230,8 +228,6 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
|||||||
|
|
||||||
var showRebootDialog by remember { mutableStateOf(false) }
|
var showRebootDialog by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
var showWarningDialog by remember { mutableStateOf(false) }
|
|
||||||
|
|
||||||
if (ksuVersion != null) {
|
if (ksuVersion != null) {
|
||||||
SwitchItem(
|
SwitchItem(
|
||||||
icon = Icons.Filled.Build,
|
icon = Icons.Filled.Build,
|
||||||
@@ -239,41 +235,18 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
|||||||
summary = stringResource(id = R.string.use_overlay_fs_summary),
|
summary = stringResource(id = R.string.use_overlay_fs_summary),
|
||||||
checked = useOverlayFs
|
checked = useOverlayFs
|
||||||
) {
|
) {
|
||||||
if (!hasShownWarning.value) {
|
prefs.edit().putBoolean("use_overlay_fs", it).apply()
|
||||||
showWarningDialog = true
|
useOverlayFs = it
|
||||||
|
if (useOverlayFs) {
|
||||||
|
moduleBackup()
|
||||||
|
} else {
|
||||||
|
moduleMigration()
|
||||||
}
|
}
|
||||||
|
if (isManager) install()
|
||||||
|
showRebootDialog = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showWarningDialog) {
|
|
||||||
AlertDialog(
|
|
||||||
onDismissRequest = { showWarningDialog = false },
|
|
||||||
title = { Text(stringResource(R.string.warning)) },
|
|
||||||
text = { Text(stringResource(R.string.warning_message)) },
|
|
||||||
confirmButton = {
|
|
||||||
TextButton(onClick = {
|
|
||||||
showWarningDialog = false
|
|
||||||
prefs.edit().putBoolean("use_overlay_fs", !useOverlayFs).apply()
|
|
||||||
useOverlayFs = !useOverlayFs
|
|
||||||
if (useOverlayFs) {
|
|
||||||
moduleBackup()
|
|
||||||
} else {
|
|
||||||
moduleMigration()
|
|
||||||
}
|
|
||||||
if (isManager) install()
|
|
||||||
showRebootDialog = true
|
|
||||||
}) {
|
|
||||||
Text(stringResource(R.string.proceed))
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dismissButton = {
|
|
||||||
TextButton(onClick = { showWarningDialog = false }) {
|
|
||||||
Text(stringResource(R.string.cancel))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showRebootDialog) {
|
if (showRebootDialog) {
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
onDismissRequest = { showRebootDialog = false },
|
onDismissRequest = { showRebootDialog = false },
|
||||||
|
|||||||
Reference in New Issue
Block a user