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
|
|
@ -197,7 +197,6 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
|||
DispatchQueue.main.async {
|
||||
self.passwordEntity!.synced = false
|
||||
self.passwordStore.saveUpdated(passwordEntity: self.passwordEntity!)
|
||||
NotificationCenter.default.post(Notification(name: Notification.Name("passwordUpdated")))
|
||||
self.setTableData()
|
||||
self.tableView.reloadData()
|
||||
SVProgressHUD.showSuccess(withStatus: "Success")
|
||||
|
|
@ -397,7 +396,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
|||
}
|
||||
|
||||
private func addNotificationObservers() {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(setShouldPopCurrentView), name: NSNotification.Name(rawValue: "passwordStoreChangeDiscarded"), object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(setShouldPopCurrentView), name: .passwordStoreChangeDiscarded, object: nil)
|
||||
}
|
||||
|
||||
func setShouldPopCurrentView() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue