When posting a new Notification Center notification, make sure any previous notifications are removed

This commit is contained in:
Greg Neagle
2025-12-16 07:51:11 -06:00
parent 6dd7f443f0
commit e12ae90a7c
@@ -199,6 +199,7 @@ long const DefaultUseNotificationCenterDays = 3;
center.delegate = self;
// First remove earlier notifications from us
[center removeAllPendingNotificationRequests];
[center removeAllDeliveredNotifications];
// request authorization
[center requestAuthorizationWithOptions:(UNAuthorizationOptionProvisional + UNAuthorizationOptionAlert)
completionHandler:^(BOOL granted, NSError * _Nullable error) {