Add PGPAgent tests and minor updated

This commit is contained in:
Yishi Lin 2019-07-20 00:16:51 +08:00
parent a628a9b4da
commit e967bb1f4c
8 changed files with 68 additions and 43 deletions

View file

@ -31,7 +31,7 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
if identifier == "saveAddPasswordSegue" {
// check PGP key
guard passwordStore.pgpAgent?.imported ?? false else {
guard passwordStore.pgpAgent?.isImported ?? false else {
let alertTitle = "CannotAddPassword".localize()
let alertMessage = "PgpKeyNotSet.".localize()
Utils.alert(title: alertTitle, message: alertMessage, controller: self, completion: nil)