mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Push notifications: UILocalNotification.fireDate is useless to dedup notifications. Remove it
This commit is contained in:
parent
4e91844403
commit
7fc23665b8
1 changed files with 1 additions and 4 deletions
|
@ -1391,8 +1391,6 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
notificationBody = [notificationBody stringByReplacingOccurrencesOfString:@"%" withString:@"%%"];
|
||||
|
||||
UILocalNotification *eventNotification = [[UILocalNotification alloc] init];
|
||||
eventNotification.fireDate = [NSDate date];
|
||||
eventNotification.timeZone = [NSTimeZone localTimeZone];
|
||||
eventNotification.alertBody = notificationBody;
|
||||
eventNotification.userInfo = @{
|
||||
@"type": @"full",
|
||||
|
@ -1592,8 +1590,6 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
}
|
||||
|
||||
UILocalNotification *localNotificationForFailedSync = [[UILocalNotification alloc] init];
|
||||
localNotificationForFailedSync.fireDate = [NSDate date];
|
||||
localNotificationForFailedSync.timeZone = [NSTimeZone localTimeZone];
|
||||
localNotificationForFailedSync.userInfo = userInfo;
|
||||
localNotificationForFailedSync.alertBody = [self limitedNotificationBodyForEvent:eventId inMatrixSession:mxSession];
|
||||
|
||||
|
@ -1646,6 +1642,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
@param type the type of notification. @"full" or @"limited". nil for any type.
|
||||
@return the local notification if any.
|
||||
*/
|
||||
// TODO: This method does not work: [[UIApplication sharedApplication] scheduledLocalNotifications] is not reliable
|
||||
- (UILocalNotification*)displayedLocalNotificationForEvent:(NSString*)eventId andUser:(NSString*)userId type:(NSString*)type
|
||||
{
|
||||
NSLog(@"[AppDelegate] displayedLocalNotificationForEvent: %@ andUser: %@. Current scheduledLocalNotifications: %@", eventId, userId, [[UIApplication sharedApplication] scheduledLocalNotifications]);
|
||||
|
|
Loading…
Reference in a new issue