Implement fail-safe mechanism if key id is not found

This commit is contained in:
Mingshen Sun 2020-04-17 23:56:14 -07:00
parent 0cae6af60d
commit 3e114daca1
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
11 changed files with 161 additions and 58 deletions

View file

@ -147,7 +147,7 @@ class GitRepositorySettingsTableViewController: UITableViewController {
alert.addAction(UIAlertAction(title: "Overwrite".localize(), style: .destructive) { _ in
self.cloneAndSegueIfSuccess()
})
alert.addAction(UIAlertAction(title: "Cancel".localize(), style: .cancel, handler: nil))
alert.addAction(UIAlertAction.cancel())
return alert
}()
self.present(overwriteAlert, animated: true)
@ -271,7 +271,7 @@ class GitRepositorySettingsTableViewController: UITableViewController {
self.gitAuthenticationMethod = .password
})
}
optionMenu.addAction(UIAlertAction(title: "Cancel".localize(), style: .cancel, handler: nil))
optionMenu.addAction(UIAlertAction.cancel())
optionMenu.popoverPresentationController?.sourceView = authSSHKeyCell
optionMenu.popoverPresentationController?.sourceRect = authSSHKeyCell.bounds
present(optionMenu, animated: true)