diff options
author | 2019-03-11 18:09:48 +0530 | |
---|---|---|
committer | 2019-03-18 06:46:56 +0100 | |
commit | 01be43aa7a03e6c3d227f9861002e56f368a9ee0 (patch) | |
tree | f91a58c982d3601c445cdd0ec966b08460e00936 /WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift | |
parent | on-demand: macOS: Disable SSIDs field when adding a tunnel (diff) | |
download | wireguard-apple-01be43aa7a03e6c3d227f9861002e56f368a9ee0.tar.xz wireguard-apple-01be43aa7a03e6c3d227f9861002e56f368a9ee0.zip |
on-demand: View model should account for isActivateOnDemandEnabled
This is needed to correctly handle NETunnelProviderManager's
isOnDemandEnabled property getting changed outside of the app.
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift index 2bba189..51420c4 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift @@ -99,7 +99,7 @@ class TunnelEditViewController: NSViewController { init(tunnelsManager: TunnelsManager, tunnel: TunnelContainer?) { self.tunnelsManager = tunnelsManager self.tunnel = tunnel - self.onDemandViewModel = tunnel != nil ? ActivateOnDemandViewModel(option: tunnel!.onDemandOption) : ActivateOnDemandViewModel() + self.onDemandViewModel = tunnel != nil ? ActivateOnDemandViewModel(tunnel: tunnel!) : ActivateOnDemandViewModel() super.init(nibName: nil, bundle: nil) } |