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

@ -10,7 +10,8 @@ import UIKit
import SwiftyUserDefaults
class GeneralSettingsTableViewController: BasicStaticTableViewController {
let passwordStore = PasswordStore.shared
let hideUnknownSwitch: UISwitch = {
let uiSwitch = UISwitch()
uiSwitch.onTintColor = Globals.blue
@ -177,7 +178,7 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
func rememberPassphraseSwitchAction(_ sender: Any?) {
Defaults[.isRememberPassphraseOn] = rememberPassphraseSwitch.isOn
if rememberPassphraseSwitch.isOn == false {
PasswordStore.shared.pgpKeyPassphrase = nil
passwordStore.pgpKeyPassphrase = nil
}
}