Fix a couple concurrency warnings.

This commit is contained in:
Brent Simmons 2024-06-30 18:14:42 -07:00
parent caa5f8b85c
commit f7cd359804

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
import Web import Web
import Account import Account
import BackgroundTasks @preconcurrency import BackgroundTasks
import os.log import os.log
import Secrets import Secrets
import WidgetKit import WidgetKit
@ -215,7 +215,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
completionHandler([.list, .banner, .badge, .sound]) completionHandler([.list, .banner, .badge, .sound])
} }
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { nonisolated func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
MainActor.assumeIsolated {
defer { completionHandler() } defer { completionHandler() }
let userInfo = response.notification.request.content.userInfo let userInfo = response.notification.request.content.userInfo
@ -233,9 +235,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
}) })
} }
} }
} }
}
} }
// MARK: App Initialization // MARK: App Initialization