Adjust Push Notification Logic
Nucleic-Session: 0F065CD6-20FE-4941-ACF5-C57A4572A5A3 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -121,7 +121,7 @@ final class NotificationRouter: NSObject {
|
|||||||
center.getDeliveredNotifications { delivered in
|
center.getDeliveredNotifications { delivered in
|
||||||
let stale = delivered.map(\.request.identifier).filter { $0.hasPrefix("approval-") }
|
let stale = delivered.map(\.request.identifier).filter { $0.hasPrefix("approval-") }
|
||||||
guard !stale.isEmpty else { return }
|
guard !stale.isEmpty else { return }
|
||||||
center.removeDeliveredNotifications(withIdentifiers: stale)
|
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: stale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user