]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commit
UI: When saving on-demand rules on a config, enable on-demand if active
authorRoopesh Chander <roop@roopc.net>
Thu, 23 Sep 2021 19:11:46 +0000 (00:41 +0530)
committerRoopesh Chander <roop@roopc.net>
Thu, 23 Sep 2021 19:31:10 +0000 (01:01 +0530)
commitba644415c7ff925e34bbabd2448e41c49924b2fa
tree9392f9456b8cbed85aca96c96bbfd441ad065d28
parent10da5cfdef362889b438cfbeff867a74e6d717fd
UI: When saving on-demand rules on a config, enable on-demand if active

When a user saves on-demand rules on the configuration, set
onDemandEnabled to true if the tunnel is active, and false if it isn't.
Then deactivate the tunnel.

Signed-off-by: Roopesh Chander <roop@roopc.net>
Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
Sources/WireGuardApp/Tunnel/TunnelsManager.swift