diff options
Diffstat (limited to 'WireGuard/WireGuard/UI/iOS/ViewController')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift | 6 | ||||
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift index 32393a9..f198e06 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift @@ -45,7 +45,7 @@ class TunnelDetailTableViewController: UITableViewController { self.tunnelsManager = tunnelsManager self.tunnel = tunnel tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnel.tunnelConfiguration) - onDemandViewModel = ActivateOnDemandViewModel(option: tunnel.onDemandOption) + onDemandViewModel = ActivateOnDemandViewModel(tunnel: tunnel) super.init(style: .grouped) loadSections() loadVisibleFields() @@ -60,7 +60,7 @@ class TunnelDetailTableViewController: UITableViewController { } onDemandObservationToken = tunnel.observe(\.isActivateOnDemandEnabled) { [weak self] tunnel, _ in // Handle On-Demand getting turned on/off outside of the app - self?.onDemandViewModel = ActivateOnDemandViewModel(option: tunnel.onDemandOption) + self?.onDemandViewModel = ActivateOnDemandViewModel(tunnel: tunnel) self?.updateActivateOnDemandFields() } } @@ -274,7 +274,7 @@ class TunnelDetailTableViewController: UITableViewController { extension TunnelDetailTableViewController: TunnelEditTableViewControllerDelegate { func tunnelSaved(tunnel: TunnelContainer) { tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnel.tunnelConfiguration) - onDemandViewModel = ActivateOnDemandViewModel(option: tunnel.onDemandOption) + onDemandViewModel = ActivateOnDemandViewModel(tunnel: tunnel) loadSections() loadVisibleFields() title = tunnel.name diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift index 943e7e5..9b9390c 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift @@ -60,7 +60,7 @@ class TunnelEditTableViewController: UITableViewController { self.tunnelsManager = tunnelsManager self.tunnel = tunnel tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnel.tunnelConfiguration) - onDemandViewModel = ActivateOnDemandViewModel(option: tunnel.onDemandOption) + onDemandViewModel = ActivateOnDemandViewModel(tunnel: tunnel) super.init(style: .grouped) loadSections() } |