@@ -73,8 +73,9 @@ extension AppDelegate {
7373 }
7474}
7575
76- extension AppDelegate : UNUserNotificationCenterDelegate {
77- nonisolated func userNotificationCenter(
76+ extension AppDelegate : @MainActor UNUserNotificationCenterDelegate {
77+ // Called when the user taps on a notification while in background.
78+ func userNotificationCenter(
7879 _ center: UNUserNotificationCenter ,
7980 didReceive response: UNNotificationResponse
8081 ) async {
@@ -86,9 +87,9 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
8687
8788 switch response. actionIdentifier {
8889 case UNNotificationDismissActionIdentifier:
89- await notificationSurfaceManager. didDismissNotification ( messageId)
90+ notificationSurfaceManager. didDismissNotification ( messageId)
9091 default :
91- await notificationSurfaceManager. didTapNotification ( messageId)
92+ notificationSurfaceManager. didTapNotification ( messageId)
9293 }
9394 } else if content. categoryIdentifier == NotificationCloseTabs . notificationCategoryId {
9495 switch response. actionIdentifier {
@@ -105,11 +106,10 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
105106 }
106107
107108 // Called when the user receives a tab (or any other notification) while in foreground.
108- nonisolated func userNotificationCenter(
109+ func userNotificationCenter(
109110 _ center: UNUserNotificationCenter ,
110111 willPresent notification: UNNotification
111112 ) async -> UNNotificationPresentationOptions {
112- let profile = await self . profile
113113 if profile. prefs. boolForKey ( PendingAccountDisconnectedKey) ?? false {
114114 profile. removeAccount ( )
115115
0 commit comments