Tunnel edit: Set correct title when editing

This commit is contained in:
Roopesh Chander 2018-10-29 02:24:32 +05:30
parent b9d6d194bc
commit 6b6a4d3f17
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class TunnelEditTableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.title = "New configuration"
self.title = (tunnel == nil) ? "New configuration" : "Edit configuration"
self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .save, target: self, action: #selector(saveTapped))
self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(cancelTapped))