notify: switch over to new typesafe notifications

This commit is contained in:
William Casarin
2023-07-30 10:50:41 -07:00
parent 80063af19a
commit b40c595a7c
39 changed files with 129 additions and 289 deletions

View File

@@ -34,7 +34,7 @@ struct MainView: View {
}
}
.dynamicTypeSize(.xSmall ... .xxxLarge)
.onReceive(handle_notify(.logout)) { _ in
.onReceive(handle_notify(.logout)) { () in
try? clear_keypair()
keypair = nil
}
@@ -59,7 +59,7 @@ class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDele
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
let userInfo = response.notification.request.content.userInfo
let notification = LossyLocalNotification.from_user_info(user_info: userInfo)
notify(.local_notification, notification)
notify(.local_notification(notification))
completionHandler()
}
}