Skip to content

Commit

Permalink
don't bother ignoring notifications on iOS 10+
Browse files Browse the repository at this point in the history
  • Loading branch information
fridtjof committed Mar 13, 2019
1 parent 2f1b615 commit 93ce20e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Riot/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -1501,15 +1501,8 @@ - (void)handleLocalNotificationsForAccount:(MXKAccount*)account
MXEvent *event;

// Ignore event already notified to the user
if (@available(iOS 10, *))
{
if ([self displayedNotificationRequestForEvent:eventId andUser:account.mxCredentials.userId type:nil])
{
NSLog(@"[AppDelegate][Push] handleLocalNotificationsForAccount: Skip event already displayed in a notification. Event id: %@", eventId);
continue;
}
}
else if ([self displayedLocalNotificationForEvent:eventId andUser:account.mxCredentials.userId type:nil])
// only necessary on iOS 9, iOS 10 will just overwrite notifications with identical IDs
if (!@available(iOS 10, *) && [self displayedLocalNotificationForEvent:eventId andUser:account.mxCredentials.userId type:nil])
{
NSLog(@"[AppDelegate][Push] handleLocalNotificationsForAccount: Skip event already displayed in a notification. Event id: %@", eventId);
continue;
Expand Down

0 comments on commit 93ce20e

Please # to comment.