Fix cannot removing PGP keys

This commit is contained in:
Bob Sun 2017-06-03 18:12:33 -07:00
parent e549db0714
commit b2d93c8a70
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
4 changed files with 29 additions and 25 deletions

View file

@ -156,7 +156,7 @@ class GitServerSettingTableViewController: UITableViewController {
if Defaults[.gitSSHKeySource] != nil {
let deleteAction = UIAlertAction(title: "Remove Git SSH Keys", style: .destructive) { _ in
Utils.removeGitSSHKeys()
self.passwordStore.removeGitSSHKeys()
Defaults[.gitSSHKeySource] = nil
if let sshLabel = self.sshLabel {
sshLabel.isEnabled = false

View file

@ -343,7 +343,7 @@ class SettingsTableViewController: UITableViewController {
if Defaults[.pgpKeySource] != nil {
let deleteAction = UIAlertAction(title: "Remove PGP Keys", style: .destructive) { _ in
Utils.removePGPKeys()
self.passwordStore.removePGPKeys()
self.pgpKeyTableViewCell.detailTextLabel?.text = "Not Set"
}
optionMenu.addAction(deleteAction)