Polish logic on initializing PGP keys.
- simplify interfaces - more robust
This commit is contained in:
parent
df8e254c34
commit
d338e725d5
6 changed files with 93 additions and 63 deletions
|
|
@ -27,7 +27,7 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
|
|||
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
|
||||
if identifier == "saveAddPasswordSegue" {
|
||||
// check PGP key
|
||||
if Defaults[.pgpKeyID] == nil {
|
||||
if PasswordStore.shared.privateKey == nil {
|
||||
let alertTitle = "Cannot Add Password"
|
||||
let alertMessage = "PGP Key is not set. Please set your PGP Key first."
|
||||
Utils.alert(title: alertTitle, message: alertMessage, controller: self, completion: nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue