chore: commit all pending changes

This commit is contained in:
Trey t
2026-02-10 18:15:36 -06:00
parent b993ed3613
commit 53cc532ca9
51 changed files with 2583 additions and 268 deletions

View File

@@ -39,8 +39,27 @@ class AppDelegate: NSObject, UIApplicationDelegate {
didReceiveRemoteNotification userInfo: [AnyHashable: Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
) {
// Handle CloudKit subscription notification
// TODO: Re-implement subscription handling for ItineraryItem changes
completionHandler(.noData)
guard let notification = CKNotification(fromRemoteNotificationDictionary: userInfo) as? CKQueryNotification,
let subscriptionID = notification.subscriptionID,
CloudKitService.canonicalSubscriptionIDs.contains(subscriptionID),
let recordType = CloudKitService.recordType(forSubscriptionID: subscriptionID) else {
completionHandler(.noData)
return
}
Task { @MainActor in
var changed = false
if notification.queryNotificationReason == .recordDeleted,
let recordID = notification.recordID {
changed = await BackgroundSyncManager.shared.applyDeletionHint(
recordType: recordType,
recordName: recordID.recordName
)
}
let updated = await BackgroundSyncManager.shared.triggerSyncFromPushNotification(subscriptionID: subscriptionID)
completionHandler((changed || updated) ? .newData : .noData)
}
}
}