diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsViewModel.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsViewModel.kt index f40df18..2d6051f 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsViewModel.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsViewModel.kt @@ -182,8 +182,12 @@ constructor( try { rootShell.start() Timber.i("Root shell accepted!") - saveKernelMode(on = true) - saveAmneziaMode(false) + saveSettings( + uiState.value.settings.copy( + isKernelEnabled = true, + isAmneziaEnabled = false, + ), + ) } catch (e: RootShell.RootShellException) { Timber.e(e)