mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
optimization
This commit is contained in:
parent
39048ab01f
commit
f8211b9d03
1 changed files with 6 additions and 3 deletions
|
|
@ -71,8 +71,11 @@
|
|||
while (results) {
|
||||
LinphoneSearchResult *result = results->data;
|
||||
const LinphoneAddress *addr = linphone_search_result_get_address(result);
|
||||
const char *phoneNumber = linphone_search_result_get_phone_number(result);
|
||||
if (!addr) {
|
||||
const char *phoneNumber = linphone_search_result_get_phone_number(result);
|
||||
if (!phoneNumber)
|
||||
continue;
|
||||
|
||||
LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config(LC);
|
||||
const char *normalizedPhoneNumber = linphone_proxy_config_normalize_phone_number(cfg, phoneNumber);
|
||||
addr = linphone_proxy_config_normalize_sip_uri(cfg, normalizedPhoneNumber);
|
||||
|
|
@ -80,7 +83,7 @@
|
|||
char *uri = linphone_address_as_string_uri_only(addr);
|
||||
NSString *address = [NSString stringWithUTF8String:uri];
|
||||
ms_free(uri);
|
||||
Contact *contact = [LinphoneManager.instance.fastAddressBook.addressBookMap objectForKey:address];
|
||||
/*Contact *contact = [LinphoneManager.instance.fastAddressBook.addressBookMap objectForKey:address];
|
||||
NSString *name = [FastAddressBook displayNameForContact:contact];
|
||||
Boolean linphoneContact = [FastAddressBook contactHasValidSipDomain:contact]
|
||||
|| (contact.friend && linphone_presence_model_get_basic_status(linphone_friend_get_presence_model(contact.friend)) == LinphonePresenceBasicStatusOpen);
|
||||
|
|
@ -89,7 +92,7 @@
|
|||
if (((filter.length == 0)
|
||||
|| ([name.lowercaseString containsSubstring:filter.lowercaseString])
|
||||
|| ([address.lowercaseString containsSubstring:filter.lowercaseString]))
|
||||
&& add)
|
||||
&& add)*/
|
||||
[_addresses addObject:address];
|
||||
|
||||
results = results->next;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue