mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-24 16:10:41 +01:00
Convert receiveRemoteNotification delegate method to async await.
This commit is contained in:
parent
80f34c1607
commit
1b5c8976f1
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user