Show folder name in nagivation bar

This commit is contained in:
Mingshen Sun 2019-09-29 15:59:11 -07:00
parent 9330cbc1e0
commit fcec7d1245
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
3 changed files with 11 additions and 0 deletions

View file

@ -245,6 +245,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
tableView.contentInset = UIEdgeInsets.init(top: 44, left: 0, bottom: 0, right: 0)
view.addSubview(searchBarView!)
}
navigationItem.title = "PasswordStore".localize()
tableView.refreshControl = syncControl
SVProgressHUD.setDefaultMaskType(.black)
tableView.register(UINib(nibName: "PasswordWithFolderTableViewCell", bundle: nil), forCellReuseIdentifier: "passwordWithFolderTableViewCell")
@ -549,8 +550,16 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
if parentPasswordEntity != nil {
navigationItem.leftBarButtonItem = backUIBarButtonItem
navigationItem.title = parentPasswordEntity?.getName()
if #available(iOS 11, *) {
navigationController?.navigationBar.prefersLargeTitles = false
}
} else {
navigationItem.leftBarButtonItem = nil
navigationItem.title = "PasswordStore".localize()
if #available(iOS 11, *) {
navigationController?.navigationBar.prefersLargeTitles = true
}
}
navigationItem.rightBarButtonItem = addPasswordUIBarButtonItem