From f3e32ab7376e535fec5695de03062b9a8eb1ced2 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Fri, 9 Nov 2018 19:20:33 +0530 Subject: Remove unused code Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/UI/iOS/MainViewController.swift | 4 ---- .../UI/iOS/TunnelsListTableViewController.swift | 20 -------------------- 2 files changed, 24 deletions(-) (limited to 'WireGuard/WireGuard') diff --git a/WireGuard/WireGuard/UI/iOS/MainViewController.swift b/WireGuard/WireGuard/UI/iOS/MainViewController.swift index 92bb864..359fcfe 100644 --- a/WireGuard/WireGuard/UI/iOS/MainViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/MainViewController.swift @@ -31,10 +31,6 @@ class MainViewController: UISplitViewController { // On iPad, always show both masterVC and detailVC, even in portrait mode, like the Settings app self.preferredDisplayMode = .allVisible } - - func openForEditing(configFileURL: URL) { - tunnelsListVC?.openForEditing(configFileURL: configFileURL) - } } extension MainViewController: UISplitViewControllerDelegate { diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift index 7ce2be9..d40eef7 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift @@ -127,26 +127,6 @@ class TunnelsListTableViewController: UIViewController { self.present(settingsNC, animated: true) } - func openForEditing(configFileURL: URL) { - let tunnelConfiguration: TunnelConfiguration? - let name = configFileURL.deletingPathExtension().lastPathComponent - do { - let fileContents = try String(contentsOf: configFileURL) - try tunnelConfiguration = WgQuickConfigFileParser.parse(fileContents, name: name) - } catch (let error) { - showErrorAlert(title: "Unable to import tunnel", message: "An error occured when importing the tunnel configuration: \(String(describing: error))") - return - } - tunnelConfiguration?.interface.name = name - if let tunnelsManager = tunnelsManager { - presentViewControllerForTunnelCreation(tunnelsManager: tunnelsManager, tunnelConfiguration: tunnelConfiguration) - } else { - onTunnelsManagerReady = { [weak self] tunnelsManager in - self?.presentViewControllerForTunnelCreation(tunnelsManager: tunnelsManager, tunnelConfiguration: tunnelConfiguration) - } - } - } - func presentViewControllerForTunnelCreation(tunnelsManager: TunnelsManager, tunnelConfiguration: TunnelConfiguration?) { let editVC = TunnelEditTableViewController(tunnelsManager: tunnelsManager, tunnelConfiguration: tunnelConfiguration) let editNC = UINavigationController(rootViewController: editVC) -- cgit v1.2.3-59-g8ed1b