From 893a03d3b1b247111334ee70376010bf990217a1 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 27 Sep 2024 00:15:08 -0400 Subject: [PATCH] fix: always on vpn settings state --- .../ui/screens/settings/SettingsScreen.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt index 4593d2a..556621e 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt @@ -545,9 +545,10 @@ fun SettingsScreen( ConfigurationToggle( stringResource(R.string.always_on_vpn_support), enabled = !( - uiState.settings.isTunnelOnWifiEnabled || - uiState.settings.isTunnelOnWifiEnabled || - uiState.settings.isTunnelOnMobileDataEnabled + (uiState.settings.isTunnelOnWifiEnabled || + uiState.settings.isTunnelOnEthernetEnabled || + uiState.settings.isTunnelOnMobileDataEnabled) && + uiState.settings.isAutoTunnelEnabled ), checked = uiState.settings.isAlwaysOnVpnEnabled, padding = screenPadding,