add check when saving Git server settings (#1)

This commit is contained in:
Bob Sun 2017-02-06 11:11:26 +08:00
parent 81b707266d
commit d3f186013e
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
3 changed files with 20 additions and 2 deletions

View file

@ -156,7 +156,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
if identifier == "showPasswordDetail" {
if Defaults[.pgpKeyID] == "" {
let alert = UIAlertController(title: "Unable to Decrypt Password", message: "PGP Key is not set. Please set your PGP Key first.", preferredStyle: UIAlertControllerStyle.alert)
let alert = UIAlertController(title: "Cannot Show Password", message: "PGP Key is not set. Please set your PGP Key first.", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
self.present(alert, animated: true, completion: nil)
if let s = sender as? UITableViewCell {