mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Go to history details on missed call notification
This commit is contained in:
parent
70594da3cb
commit
402ff3da1b
2 changed files with 21 additions and 1 deletions
|
|
@ -226,6 +226,26 @@
|
|||
if(controller != nil) {
|
||||
[controller setRemoteAddress:remoteContact];
|
||||
}
|
||||
} else if([notification.userInfo objectForKey:@"callLog"] != nil) {
|
||||
NSString *callLog = (NSString*)[notification.userInfo objectForKey:@"callLog"];
|
||||
LinphoneCallLog* theLog = NULL;
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
while(logs != NULL) {
|
||||
LinphoneCallLog* log = (LinphoneCallLog *) logs->data;
|
||||
if([callLog isEqualToString:[NSString stringWithUTF8String:log->call_id]]) {
|
||||
theLog = log;
|
||||
break;
|
||||
}
|
||||
logs = logs->next;
|
||||
}
|
||||
if(theLog != NULL) {
|
||||
// Go to HistoryDetails view
|
||||
[[PhoneMainView instance] changeCurrentView:[HistoryViewController compositeViewDescription]];
|
||||
HistoryDetailsViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[HistoryDetailsViewController compositeViewDescription] push:TRUE], HistoryDetailsViewController);
|
||||
if(controller != nil) {
|
||||
[controller setCallLog:theLog];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
notification.repeatInterval = 0;
|
||||
notification.alertBody = [NSString stringWithFormat:NSLocalizedString(@"You miss %@ call", nil), address];
|
||||
notification.alertAction = NSLocalizedString(@"Show", nil);
|
||||
notification.userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:log->call_id] forKey:@"callLog"];
|
||||
notification.userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:log->call_id] forKey:@"callLog"];
|
||||
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
|
||||
[notification release];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue