mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Tapping on message and missed call notification with app not started navigation
This commit is contained in:
parent
d70c60d5fa
commit
b5f9daba55
3 changed files with 13 additions and 1 deletions
|
|
@ -282,7 +282,6 @@
|
|||
intentIdentifiers:[[NSMutableArray alloc] init]
|
||||
options:UNNotificationCategoryOptionCustomDismissAction];
|
||||
|
||||
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
|
||||
NSSet *categories = [NSSet setWithObjects:cat_call, cat_msg, video_call, cat_zrtp, nil];
|
||||
[[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:categories];
|
||||
|
||||
|
|
@ -295,6 +294,7 @@
|
|||
[FIRApp configure];
|
||||
#endif
|
||||
|
||||
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
|
||||
|
||||
if ([VFSUtil vfsEnabledWithGroupName:kLinphoneMsgNotificationAppGroupId]) {
|
||||
if (TARGET_IPHONE_SIMULATOR) {
|
||||
|
|
@ -611,6 +611,15 @@
|
|||
withCompletionHandler:(void (^)(void))completionHandler {
|
||||
LOGD(@"UN : response received");
|
||||
LOGD(response.description);
|
||||
|
||||
if (![response.actionIdentifier isEqualToString:@"com.apple.UNNotificationDismissActionIdentifier"] &&
|
||||
[response.notification.request.content.userInfo objectForKey:@"missed_call"]) {
|
||||
[PhoneMainView.instance changeCurrentView:VIEW(HistoryListView).compositeViewDescription];
|
||||
[PhoneMainView.instance.mainViewController didRotateFromInterfaceOrientation:PhoneMainView.instance.mainViewController.currentOrientation];
|
||||
return;
|
||||
}
|
||||
|
||||
startedInBackground = true;
|
||||
|
||||
NSString *callId = (NSString *)[response.notification.request.content.userInfo objectForKey:@"CallId"];
|
||||
if (!callId)
|
||||
|
|
|
|||
|
|
@ -408,6 +408,8 @@
|
|||
sideMenu:(NSNumber *)sideMenu
|
||||
fullscreen:(NSNumber *)fullscreen {
|
||||
|
||||
currentOrientation = [self getCorrectInterfaceOrientation:[[UIDevice currentDevice] orientation]];
|
||||
|
||||
UIViewController *oldMainViewController = self.mainViewController;
|
||||
UIViewController *oldDetailsViewController = self.detailsViewController;
|
||||
UIViewController *oldStatusBarViewController = self.statusBarViewController;
|
||||
|
|
|
|||
|
|
@ -684,6 +684,7 @@ import AVFoundation
|
|||
let content = UNMutableNotificationContent()
|
||||
content.title = NSString.localizedUserNotificationString(forKey: NSLocalizedString("Missed call", comment: ""), arguments: nil)
|
||||
content.body = NSString.localizedUserNotificationString(forKey: displayName, arguments: nil)
|
||||
content.userInfo = ["missed_call" : true]
|
||||
|
||||
// Deliver the notification.
|
||||
let request = UNNotificationRequest(identifier: "call_request", content: content, trigger: nil) // Schedule the notification.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue