From 2501622c6e2272fc24500eae05ede0ba108a7c75 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 5 Aug 2016 15:46:45 +0200 Subject: [PATCH] assistant: update --- Classes/AssistantView.m | 6 +++--- Classes/Contact.m | 6 ++++-- submodules/linphone | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Classes/AssistantView.m b/Classes/AssistantView.m index 04887e9fa..8b65ed5c2 100644 --- a/Classes/AssistantView.m +++ b/Classes/AssistantView.m @@ -401,9 +401,9 @@ static UICompositeViewDescription *compositeDescription = nil; if (!country) { //fetch phone locale for (NSString* lang in [NSLocale preferredLanguages]) { - NSUInteger idx2 = [lang rangeOfString:@"-"].location; - if (idx2 == NSNotFound) idx2 = 0; - if ((country = [CountryListViewController countryWithIso:[lang substringFromIndex:idx2]]) != nil) + NSUInteger idx = [lang rangeOfString:@"-"].location; + idx = (idx == NSNotFound) ? idx = 0 : idx + 1; + if ((country = [CountryListViewController countryWithIso:[lang substringFromIndex:idx]]) != nil) break; } } diff --git a/Classes/Contact.m b/Classes/Contact.m index 338a3184c..d93ee3edc 100644 --- a/Classes/Contact.m +++ b/Classes/Contact.m @@ -42,7 +42,7 @@ } } for (NSString* phone in _phoneNumbers) { - LOGI(@"fixme! use linphone_friend_add_phone_number for phone numbers"); +#if 0 char* normalized_phone = linphone_proxy_config_normalize_phone_number(linphone_core_get_default_proxy_config(LC), phone.UTF8String); if (normalized_phone) { LinphoneAddress* addr = linphone_core_interpret_url(LC, normalized_phone); @@ -53,7 +53,9 @@ } ms_free(normalized_phone); } -// linphone_friend_add_phone_number(_friend, phone.UTF8String); +#else + linphone_friend_add_phone_number(_friend, phone.UTF8String); +#endif } linphone_core_add_friend(LC, _friend); } diff --git a/submodules/linphone b/submodules/linphone index 3e924ef6f..97c8f0d0d 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 3e924ef6f57de9234cba2eaf373108b01adcaea5 +Subproject commit 97c8f0d0d885a020d98be3a35b6fac4c0736c554