Update views after setting updates

This commit is contained in:
Yishi Lin 2017-03-24 20:40:24 +08:00
parent f1c07f358e
commit 95b3a7fcd3
4 changed files with 17 additions and 1 deletions

View file

@ -161,7 +161,12 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
private func addNotificationObservers() {
// reset the data table if some password (maybe another one) has been updated
NotificationCenter.default.addObserver(self, selector: #selector(PasswordsViewController.actOnPasswordStoreUpdatedNotification), name: .passwordStoreUpdated, object: nil)
// reset the data table if the disaply settings have been changed
NotificationCenter.default.addObserver(self, selector: #selector(actOnPasswordStoreUpdatedNotification), name: .passwordDisplaySettingChanged, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(PasswordsViewController.actOnSearchNotification), name: .passwordSearch, object: nil)
}