Display address linked to phone number when creating a cat conversation when it's possible

This commit is contained in:
Benjamin Reis 2017-02-07 10:54:16 +01:00
parent 1bf8383c44
commit ff8f3d2da0

View file

@ -73,7 +73,12 @@
cell = [[UIChatCreateCell alloc] initWithIdentifier:kCellId];
}
cell.displayNameLabel.text = [_contacts.allValues objectAtIndex:indexPath.row];
cell.addressLabel.text = [_contacts.allKeys objectAtIndex:indexPath.row];
LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:[_contacts.allKeys objectAtIndex:indexPath.row]];
if (addr) {
cell.addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string(addr)];
} else {
cell.addressLabel.text = [_contacts.allKeys objectAtIndex:indexPath.row];
}
return cell;
}