mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
modified url support to launch app on call log view from widget
This commit is contained in:
parent
28c752ce8d
commit
c72c1f03b6
2 changed files with 23 additions and 14 deletions
|
|
@ -336,16 +336,21 @@
|
|||
[errView addAction:yesAction];
|
||||
|
||||
[PhoneMainView.instance presentViewController:errView animated:YES completion:nil];
|
||||
} else {
|
||||
if ([[url scheme] isEqualToString:@"sip"]) {
|
||||
// remove "sip://" from the URI, and do it correctly by taking resourceSpecifier and removing leading and
|
||||
// trailing "/"
|
||||
NSString *sipUri = [[url resourceSpecifier]
|
||||
stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]];
|
||||
[VIEW(DialerView) setAddress:sipUri];
|
||||
}
|
||||
}
|
||||
return YES;
|
||||
} else {
|
||||
if ([[url scheme] isEqualToString:@"sip"]) {
|
||||
// remove "sip://" from the URI, and do it correctly by taking resourceSpecifier and removing leading and
|
||||
// trailing "/"
|
||||
if ([[url host] isEqualToString:@"call_log"] &&
|
||||
[[url path] isEqualToString:@"/show"]) {
|
||||
[VIEW(HistoryDetailsView) setCallLogId:[url query]];
|
||||
[PhoneMainView.instance popToView:HistoryDetailsView.compositeViewDescription];
|
||||
} else {
|
||||
NSString *sipUri = [[url resourceSpecifier] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]];
|
||||
[VIEW(DialerView) setAddress:sipUri];
|
||||
}
|
||||
}
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)fixRing {
|
||||
|
|
|
|||
|
|
@ -39,19 +39,23 @@
|
|||
completionHandler:nil];
|
||||
}
|
||||
|
||||
- (void)launchOnHistoryDetailsWithId:(NSString *)logId {
|
||||
[self launchAppWithURL:[NSURL URLWithString:[@"sip://call_log/show?" stringByAppendingString:logId]]];
|
||||
}
|
||||
|
||||
- (IBAction)firstButtonTapped {
|
||||
[self launchAppWithURL:[NSURL URLWithString:@"sip://"]];
|
||||
[self launchOnHistoryDetailsWithId:@""];
|
||||
}
|
||||
|
||||
- (IBAction)secondButtonTapped {
|
||||
[self launchAppWithURL:[NSURL URLWithString:@"sip://"]];
|
||||
[self launchOnHistoryDetailsWithId:@""];
|
||||
}
|
||||
|
||||
- (IBAction)thirdButtonTapped {
|
||||
[self launchAppWithURL:[NSURL URLWithString:@"sip://"]];
|
||||
[self launchOnHistoryDetailsWithId:@""];
|
||||
}
|
||||
|
||||
- (IBAction)fourthButtonTapped {
|
||||
[self launchAppWithURL:[NSURL URLWithString:@"sip://"]];
|
||||
[self launchOnHistoryDetailsWithId:@""];
|
||||
}
|
||||
@end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue