mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
remove any lingering legacy notifications in modern notification adapter
This commit is contained in:
parent
cb3a36ba3d
commit
5e0c10a1a9
|
@ -222,6 +222,10 @@ extension LegacyNotificationPresenterAdaptee: NotificationPresenterAdaptee {
|
|||
for (_, notification) in notifications {
|
||||
cancelNotification(notification)
|
||||
}
|
||||
type(of: self).clearExistingNotifications()
|
||||
}
|
||||
|
||||
public class func clearExistingNotifications() {
|
||||
// This will cancel all "scheduled" local notifications that haven't
|
||||
// been presented yet.
|
||||
UIApplication.shared.cancelAllLocalNotifications()
|
||||
|
|
|
@ -181,6 +181,7 @@ extension UserNotificationPresenterAdaptee: NotificationPresenterAdaptee {
|
|||
AssertIsOnMainThread()
|
||||
notificationCenter.removeAllPendingNotificationRequests()
|
||||
notificationCenter.removeAllDeliveredNotifications()
|
||||
LegacyNotificationPresenterAdaptee.clearExistingNotifications()
|
||||
}
|
||||
|
||||
func shouldPresentNotification(category: AppNotificationCategory, userInfo: [AnyHashable: Any]) -> Bool {
|
||||
|
|
Loading…
Reference in a new issue