diff options
author | Roopesh Chander <roop@roopc.net> | 2018-12-19 16:30:34 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-12-19 18:35:53 +0530 |
commit | 9268c0c4bc2f719df28af54625fc017eba37c9f9 (patch) | |
tree | 5abea0fcbf15d3c79e078a6b5070b4bc5f4f1c7b | |
parent | NE: Log whether tunnel was activated from the app or not (diff) | |
download | wireguard-apple-9268c0c4bc2f719df28af54625fc017eba37c9f9.tar.xz wireguard-apple-9268c0c4bc2f719df28af54625fc017eba37c9f9.zip |
Tunnel edit: init() need not take a tunnelConfiguration argument
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift | 5 | ||||
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift index f92f283..4aa1180 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift @@ -55,12 +55,11 @@ class TunnelEditTableViewController: UITableViewController { loadSections() } - init(tunnelsManager: TunnelsManager, tunnelConfiguration: TunnelConfiguration?) { + init(tunnelsManager: TunnelsManager) { // Use this initializer to create a new tunnel. - // If tunnelConfiguration is passed, data will be prepopulated from that configuration. self.tunnelsManager = tunnelsManager tunnel = nil - tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnelConfiguration) + tunnelViewModel = TunnelViewModel(tunnelConfiguration: nil) activateOnDemandSetting = ActivateOnDemandSetting.defaultSetting super.init(style: .grouped) loadSections() diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift index 3225fe0..c07657f 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift @@ -110,7 +110,7 @@ class TunnelsListTableViewController: UIViewController { let createFromScratchAction = UIAlertAction(title: "Create from scratch", style: .default) { [weak self] _ in if let self = self, let tunnelsManager = self.tunnelsManager { - self.presentViewControllerForTunnelCreation(tunnelsManager: tunnelsManager, tunnelConfiguration: nil) + self.presentViewControllerForTunnelCreation(tunnelsManager: tunnelsManager) } } alert.addAction(createFromScratchAction) @@ -136,8 +136,8 @@ class TunnelsListTableViewController: UIViewController { present(settingsNC, animated: true) } - func presentViewControllerForTunnelCreation(tunnelsManager: TunnelsManager, tunnelConfiguration: TunnelConfiguration?) { - let editVC = TunnelEditTableViewController(tunnelsManager: tunnelsManager, tunnelConfiguration: tunnelConfiguration) + func presentViewControllerForTunnelCreation(tunnelsManager: TunnelsManager) { + let editVC = TunnelEditTableViewController(tunnelsManager: tunnelsManager) let editNC = UINavigationController(rootViewController: editVC) editNC.modalPresentationStyle = .formSheet present(editNC, animated: true) |