mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Convert receiveRemoteNotification delegate method to async await.
This commit is contained in:
@@ -56,8 +56,7 @@ public protocol CloudKitZone: AnyObject {
|
||||
func subscribeToZoneChanges()
|
||||
|
||||
/// Process a remove notification
|
||||
func receiveRemoteNotification(userInfo: [AnyHashable : Any], completion: @escaping () -> Void)
|
||||
|
||||
func receiveRemoteNotification(userInfo: [AnyHashable : Any]) async
|
||||
}
|
||||
|
||||
public extension CloudKitZone {
|
||||
@@ -132,8 +131,10 @@ public extension CloudKitZone {
|
||||
func receiveRemoteNotification(userInfo: [AnyHashable : Any]) async {
|
||||
|
||||
await withCheckedContinuation { continuation in
|
||||
self.receiveRemoteNotification(userInfo: userInfo) {
|
||||
continuation.resume()
|
||||
Task { @MainActor in
|
||||
self.receiveRemoteNotification(userInfo: userInfo) {
|
||||
continuation.resume()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user