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:
Yishi Lin 2017-03-18 00:18:55 +08:00
parent 0ad9713fc0
commit 1f829fffcc
11 changed files with 41 additions and 29 deletions

View file

@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
func postSearchNotification() {
NotificationCenter.default.post(Notification(name: Notification.Name("search")))
NotificationCenter.default.post(name: .passwordSearch, object: nil)
}
func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {