From 8553723e04c4d63b99e669df2e43fc4a914b7f9d Mon Sep 17 00:00:00 2001 From: Eric Kuck Date: Thu, 20 Dec 2018 22:52:45 -0600 Subject: Updated NETunnelProvider save format Signed-off-by: Eric Kuck --- .../UI/iOS/ViewController/TunnelDetailTableViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift') diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift index 50c0e33..8378311 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift @@ -35,7 +35,7 @@ class TunnelDetailTableViewController: UITableViewController { init(tunnelsManager: TunnelsManager, tunnel: TunnelContainer) { self.tunnelsManager = tunnelsManager self.tunnel = tunnel - tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnel.tunnelConfiguration()) + tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnel.tunnelConfiguration) super.init(style: .grouped) loadSections() } @@ -101,7 +101,7 @@ class TunnelDetailTableViewController: UITableViewController { extension TunnelDetailTableViewController: TunnelEditTableViewControllerDelegate { func tunnelSaved(tunnel: TunnelContainer) { - tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnel.tunnelConfiguration()) + tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnel.tunnelConfiguration) loadSections() title = tunnel.name restorationIdentifier = "TunnelDetailVC:\(tunnel.name)" @@ -229,9 +229,9 @@ extension TunnelDetailTableViewController { private func onDemandCell(for tableView: UITableView, at indexPath: IndexPath) -> UITableViewCell { let cell: KeyValueCell = tableView.dequeueReusableCell(for: indexPath) cell.key = tr("tunnelOnDemandKey") - cell.value = TunnelViewModel.activateOnDemandDetailText(for: tunnel.activateOnDemandSetting()) + cell.value = TunnelViewModel.activateOnDemandDetailText(for: tunnel.activateOnDemandSetting) onDemandStatusObservationToken = tunnel.observe(\.isActivateOnDemandEnabled) { [weak cell] tunnel, _ in - cell?.value = TunnelViewModel.activateOnDemandDetailText(for: tunnel.activateOnDemandSetting()) + cell?.value = TunnelViewModel.activateOnDemandDetailText(for: tunnel.activateOnDemandSetting) } return cell } -- cgit v1.2.3-59-g8ed1b