Mark NotificationManager @unchecked Sendable
Needed because self is captured in @Sendable closures passed to UNUserNotificationCenter callbacks. Safe: the only mutable state (isAuthorized) is exclusively written on the main thread. Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import SwiftUI
|
||||
import UserNotifications
|
||||
|
||||
final class NotificationManager: NSObject, ObservableObject {
|
||||
final class NotificationManager: NSObject, ObservableObject, @unchecked Sendable {
|
||||
static let shared = NotificationManager()
|
||||
|
||||
@Published var isAuthorized = false
|
||||
|
||||
Reference in New Issue
Block a user