good presence status when creating a new contact

This commit is contained in:
REIS Benjamin 2016-10-14 12:13:34 +02:00
parent 04372218d9
commit c1f7b35560

View file

@ -44,6 +44,10 @@
- (void)setAddress:(NSString *)address {
_addressLabel.text = _editTextfield.text = address;
if(_addressLabel.text && linphone_proxy_config_is_phone_number(linphone_core_get_default_proxy_config(LC), _addressLabel.text.UTF8String)) {
char * normAddr = linphone_proxy_config_normalize_phone_number(linphone_core_get_default_proxy_config(LC), _addressLabel.text.UTF8String);
_addressLabel.text = [NSString stringWithUTF8String:normAddr];
}
LinphoneAddress *addr = linphone_core_interpret_url(LC, _addressLabel.text.UTF8String);
_chatButton.enabled = _callButton.enabled = (addr != NULL);