From: Roopesh Chander Date: Mon, 2 Aug 2021 17:39:06 +0000 (+0530) Subject: UI: When saving on-demand rules, don't set isOnDemandEnabled X-Git-Tag: 1.0.14-25~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55c587b44337c5ae9fe782c225cbab841361eeb6;p=thirdparty%2Fwireguard-apple.git 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 --- 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) {