feat: Remove same type posted notifications

Resolves: https://gitlab.steamware.net/eqn/eqn.ios/-/issues/48
This commit is contained in:
Andrea Busi
2022-05-28 15:50:17 +02:00
parent 53b8c0fab4
commit cae5fee992
4 changed files with 53 additions and 1 deletions
@@ -9,6 +9,8 @@
#import "NotificationService.h"
#import "EQNAllertaSismica.h"
#import "Costanti.h"
#import "EQNNotificationService-Swift.h"
@interface NotificationService ()
@@ -158,7 +160,10 @@ static NSString * const EQNSoundNotificationEQN = @"alert_sound.wav";
}
}
[self contentComplete];
// remove same type posted notification
[self removeNotificationsForType:notificationType completion:^{
[self contentComplete];
}];;
}
- (void)serviceExtensionTimeWillExpire