Move CloudKitRemoteNotificationOperation to CloudKitSync module.

This commit is contained in:
Brent Simmons 2024-04-22 18:02:14 -07:00
parent 5d1bd9c5e4
commit 83e73821f4

View File

@ -9,11 +9,10 @@
import Foundation import Foundation
import os.log import os.log
import Core import Core
import CloudKitSync
class CloudKitRemoteNotificationOperation: MainThreadOperation { @MainActor public final class CloudKitRemoteNotificationOperation: MainThreadOperation {
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit") private let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
// MainThreadOperation // MainThreadOperation
public var isCanceled = false public var isCanceled = false
@ -26,13 +25,13 @@ class CloudKitRemoteNotificationOperation: MainThreadOperation {
private weak var articlesZone: CloudKitArticlesZone? private weak var articlesZone: CloudKitArticlesZone?
private var userInfo: [AnyHashable : Any] private var userInfo: [AnyHashable : Any]
init(accountZone: CloudKitAccountZone, articlesZone: CloudKitArticlesZone, userInfo: [AnyHashable : Any]) { public init(accountZone: CloudKitAccountZone, articlesZone: CloudKitArticlesZone, userInfo: [AnyHashable : Any]) {
self.accountZone = accountZone self.accountZone = accountZone
self.articlesZone = articlesZone self.articlesZone = articlesZone
self.userInfo = userInfo self.userInfo = userInfo
} }
@MainActor func run() { @MainActor public func run() {
guard let accountZone = accountZone, let articlesZone = articlesZone else { guard let accountZone = accountZone, let articlesZone = articlesZone else {
self.operationDelegate?.operationDidComplete(self) self.operationDelegate?.operationDidComplete(self)
return return