mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Push notifications: Add fireDate to UILocalNotification in order to retrieve them afterwards.
It seems to be mandatory to make `[[UIApplication sharedApplication] scheduledLocalNotifications]` non empty
(cherry picked from commit 4e91844403
)
This commit is contained in:
parent
51b3a22946
commit
86eff609df
1 changed files with 4 additions and 0 deletions
|
@ -1341,6 +1341,8 @@ 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",
|
||||
|
@ -1540,6 +1542,8 @@ 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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue