mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
set addressLabel in CallView
This commit is contained in:
parent
78399e99ca
commit
7895036464
1 changed files with 8 additions and 2 deletions
|
|
@ -641,17 +641,23 @@
|
|||
|
||||
+ (void)setDisplayNameLabel:(UILabel *)label forAddress:(const LinphoneAddress *)addr withAddressLabel:(UILabel*)addressLabel{
|
||||
Contact *contact = [FastAddressBook getContactWithAddress:addr];
|
||||
NSString *tmpAddress = nil;
|
||||
if (contact) {
|
||||
[ContactDisplay setDisplayNameLabel:label forContact:contact];
|
||||
addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(addr)];
|
||||
tmpAddress = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(addr)];
|
||||
addressLabel.hidden = FALSE;
|
||||
} else {
|
||||
label.text = [FastAddressBook displayNameForAddress:addr];
|
||||
if([LinphoneManager.instance lpConfigBoolForKey:@"display_phone_only" inSection:@"app"])
|
||||
addressLabel.hidden = TRUE;
|
||||
else
|
||||
addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(addr)];
|
||||
tmpAddress = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(addr)];
|
||||
}
|
||||
NSRange range = [tmpAddress rangeOfString:@";"];
|
||||
if (range.location != NSNotFound) {
|
||||
tmpAddress = [tmpAddress substringToIndex:range.location];
|
||||
}
|
||||
addressLabel.text = tmpAddress;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue