Polish notification
- define notification names - move "post notification" to PasswordStore (todo: move "search" and the one for "show folder switch") - "erase" and "reset" also post the "passwordStoreUpdated" notification
This commit is contained in:
parent
0ad9713fc0
commit
1f829fffcc
11 changed files with 41 additions and 29 deletions
|
|
@ -142,7 +142,6 @@ class SettingsTableViewController: UITableViewController {
|
|||
DispatchQueue.main.async {
|
||||
self.passwordStore.updatePasswordEntityCoreData()
|
||||
Defaults[.lastUpdatedTime] = Date()
|
||||
NotificationCenter.default.post(Notification(name: Notification.Name("passwordUpdated")))
|
||||
Defaults[.gitRepositoryURL] = URL(string: gitRepostiroyURL)
|
||||
Defaults[.gitRepositoryUsername] = username
|
||||
Defaults[.gitRepositoryAuthenticationMethod] = auth
|
||||
|
|
@ -164,7 +163,7 @@ class SettingsTableViewController: UITableViewController {
|
|||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(SettingsTableViewController.actOnPasswordStoreErasedNotification), name: NSNotification.Name(rawValue: "passwordStoreErased"), object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(SettingsTableViewController.actOnPasswordStoreErasedNotification), name: .passwordStoreErased, object: nil)
|
||||
self.passwordRepositoryTableViewCell.detailTextLabel?.text = Defaults[.gitRepositoryURL]?.host
|
||||
touchIDTableViewCell.accessoryView = touchIDSwitch
|
||||
setPGPKeyTableViewCellDetailText()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue