Adjust Push Notification Logic

Nucleic-Session: 0F065CD6-20FE-4941-ACF5-C57A4572A5A3
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-06 12:56:34 -07:00
co-authored by Nucleic
parent 52df910d6c
commit 345840d9cc
@@ -55,10 +55,11 @@ final class PushAppDelegate: NSObject, UIApplicationDelegate {
didReceiveRemoteNotification userInfo: [AnyHashable: Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
) {
guard userInfo["clear"] != nil else { completionHandler(.noData); return }
Task { @MainActor in
NotificationRouter.shared.withdrawApprovalAttention()
completionHandler(.noData)
if userInfo["clear"] != nil {
// Fire-and-forget on the main actor (NotificationRouter is @MainActor); the removal is a
// quick UNUserNotificationCenter call, so we can report .noData right away.
Task { @MainActor in NotificationRouter.shared.withdrawApprovalAttention() }
}
completionHandler(.noData)
}
}