Put PasswordStore as instance in controllers
This commit is contained in:
parent
d338e725d5
commit
d2cff20131
12 changed files with 67 additions and 55 deletions
|
|
@ -13,6 +13,7 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
|
|||
|
||||
var password: Password?
|
||||
var tempContent: String = ""
|
||||
let passwordStore = PasswordStore.shared
|
||||
|
||||
override func viewDidLoad() {
|
||||
tableData = [
|
||||
|
|
@ -27,7 +28,7 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
|
|||
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
|
||||
if identifier == "saveAddPasswordSegue" {
|
||||
// check PGP key
|
||||
if PasswordStore.shared.privateKey == nil {
|
||||
if passwordStore.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