Open call history when tapping on a missed call notification

This commit is contained in:
Christophe Deschamps 2024-02-13 13:06:46 +01:00
parent 89cae39b6d
commit 85ebe742cb
2 changed files with 9 additions and 1 deletions

View file

@ -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"];

View file

@ -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()