mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 22:26:59 +02:00
Push notifications: More logs to track duplicated notifications
This commit is contained in:
@@ -1644,9 +1644,13 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
||||
*/
|
||||
- (UILocalNotification*)displayedLocalNotificationForEvent:(NSString*)eventId andUser:(NSString*)userId type:(NSString*)type
|
||||
{
|
||||
NSLog(@"[AppDelegate] displayedLocalNotificationForEvent: %@ andUser: %@. Current scheduledLocalNotifications: %@", eventId, userId, [[UIApplication sharedApplication] scheduledLocalNotifications]);
|
||||
|
||||
UILocalNotification *limitedLocalNotification;
|
||||
for (UILocalNotification *localNotification in [[UIApplication sharedApplication] scheduledLocalNotifications])
|
||||
{
|
||||
NSLog(@" - %@", localNotification.userInfo);
|
||||
|
||||
if ([localNotification.userInfo[@"event_id"] isEqualToString:eventId]
|
||||
&& [localNotification.userInfo[@"user_id"] isEqualToString:userId]
|
||||
&& (!type || [localNotification.userInfo[@"type"] isEqualToString:type]))
|
||||
@@ -1656,6 +1660,8 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
||||
}
|
||||
}
|
||||
|
||||
NSLog(@"[AppDelegate] displayedLocalNotificationForEvent: found: %@", limitedLocalNotification);
|
||||
|
||||
return limitedLocalNotification;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user