Tunnels list: The Add and Settings buttons should be no-ops until the tunnels are loaded
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
f6a29d9f50
commit
9df0064eac
|
@ -42,6 +42,7 @@ class TunnelsListTableViewController: UITableViewController {
|
|||
}
|
||||
|
||||
@objc func addButtonTapped(sender: UIBarButtonItem!) {
|
||||
if (self.tunnelsManager == nil) { return } // Do nothing until we've loaded the tunnels
|
||||
let alert = UIAlertController(title: "", message: "Add a new WireGuard tunnel", preferredStyle: .actionSheet)
|
||||
let importFileAction = UIAlertAction(title: "Create from file or archive", style: .default) { [weak self] (action) in
|
||||
self?.presentViewControllerForFileImport()
|
||||
|
@ -69,6 +70,7 @@ class TunnelsListTableViewController: UITableViewController {
|
|||
}
|
||||
|
||||
@objc func settingsButtonTapped(sender: UIBarButtonItem!) {
|
||||
if (self.tunnelsManager == nil) { return } // Do nothing until we've loaded the tunnels
|
||||
let settingsVC = SettingsTableViewController(tunnelsManager: tunnelsManager)
|
||||
let settingsNC = UINavigationController(rootViewController: settingsVC)
|
||||
settingsNC.modalPresentationStyle = .formSheet
|
||||
|
|
Loading…
Reference in New Issue