From 55c587b44337c5ae9fe782c225cbab841361eeb6 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Mon, 2 Aug 2021 23:09:06 +0530 Subject: UI: When saving on-demand rules, don't set isOnDemandEnabled When adding or modifying a config, when on-demand options are set by a user, the rules are saved, but isOnDemandEnabled is left unset (and can be set by the appropriate control in the detail view (switch in iOS / button in macOS)). Signed-off-by: Roopesh Chander --- Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift b/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift index de717a8..b92ada7 100644 --- a/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift +++ b/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift @@ -42,7 +42,7 @@ extension ActivateOnDemandOption { } } tunnelProviderManager.onDemandRules = rules - tunnelProviderManager.isOnDemandEnabled = self != .off + tunnelProviderManager.isOnDemandEnabled = false } init(from tunnelProviderManager: NETunnelProviderManager) { -- cgit v1.2.3-59-g8ed1b