forked from mirrors/linphone-iphone
Open call history when tapping on a missed call notification
This commit is contained in:
parent
89cae39b6d
commit
85ebe742cb
2 changed files with 9 additions and 1 deletions
|
|
@ -613,6 +613,14 @@
|
|||
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"];
|
||||
|
|
|
|||
|
|
@ -686,7 +686,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.
|
||||
let center = UNUserNotificationCenter.current()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue