Put PasswordStore as instance in controllers

This commit is contained in:
Bob Sun 2017-03-16 22:39:03 -07:00
parent d338e725d5
commit d2cff20131
12 changed files with 67 additions and 55 deletions

View file

@ -14,13 +14,14 @@ class PGPKeySettingTableViewController: UITableViewController {
@IBOutlet weak var pgpPublicKeyURLTextField: UITextField!
@IBOutlet weak var pgpPrivateKeyURLTextField: UITextField!
var pgpPassphrase: String?
let passwordStore = PasswordStore.shared
override func viewDidLoad() {
super.viewDidLoad()
tableView.rowHeight = UITableViewAutomaticDimension
pgpPublicKeyURLTextField.text = Defaults[.pgpPublicKeyURL]?.absoluteString
pgpPrivateKeyURLTextField.text = Defaults[.pgpPrivateKeyURL]?.absoluteString
pgpPassphrase = PasswordStore.shared.pgpKeyPassphrase
pgpPassphrase = passwordStore.pgpKeyPassphrase
}
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {