diff --git a/Classes/ChatConversationCreateView.m b/Classes/ChatConversationCreateView.m index 63712cbc5..12595171a 100644 --- a/Classes/ChatConversationCreateView.m +++ b/Classes/ChatConversationCreateView.m @@ -85,7 +85,7 @@ static UICompositeViewDescription *compositeDescription = nil; _allButton.frame = frame; } - if ([LinphoneManager.instance lpConfigBoolForKey:@"only_secure_chatrooms"]) { + if ([LinphoneManager.instance lpConfigBoolForKey:@"force_lime_chat_rooms"]) { _chiffreOptionView.hidden = true; _isEncrypted = true; _tableController.isEncrypted = true; @@ -121,7 +121,7 @@ static UICompositeViewDescription *compositeDescription = nil; frame.origin.x = self.view.frame.size.width * 0.192; } _chiffreOptionView.frame = frame; - _isEncrypted = [LinphoneManager.instance lpConfigBoolForKey:@"only_secure_chatrooms"]; // false by default + _isEncrypted = [LinphoneManager.instance lpConfigBoolForKey:@"force_lime_chat_rooms"]; // false by default CGRect buttonFrame = _chiffreButton.frame; if (!_isEncrypted) { diff --git a/Classes/ContactsListView.m b/Classes/ContactsListView.m index 179bff692..2093bcb7a 100644 --- a/Classes/ContactsListView.m +++ b/Classes/ContactsListView.m @@ -233,7 +233,7 @@ static UICompositeViewDescription *compositeDescription = nil; } - (void)refreshButtons { - [addButton setHidden:FALSE]; + [addButton setHidden:![LinphoneManager.instance lpConfigBoolForKey:@"enable_native_address_book"]]; [self changeView:[ContactSelection getSipFilterEnabled] ? ContactsLinphone : ContactsAll]; } @@ -276,6 +276,9 @@ static UICompositeViewDescription *compositeDescription = nil; - (IBAction)onEditionChangeClick:(id)sender { allButton.hidden = linphoneButton.hidden = _selectedButtonImage.hidden = addButton.hidden = self.tableController.isEditing; + if ([LinphoneManager.instance lpConfigBoolForKey:@"enable_native_address_book"]) { + addButton.hidden = self.tableController.isEditing; + } } - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar { diff --git a/Classes/Utils/FastAddressBook.m b/Classes/Utils/FastAddressBook.m index 3576d3405..a4a4e10a2 100644 --- a/Classes/Utils/FastAddressBook.m +++ b/Classes/Utils/FastAddressBook.m @@ -146,7 +146,7 @@ } + (BOOL)isAuthorized { - return ![LinphoneManager.instance lpConfigBoolForKey:@"fetch_native_contacts"] || [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts]; + return ![LinphoneManager.instance lpConfigBoolForKey:@"enable_native_address_book"] || [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts]; } - (FastAddressBook *)init { @@ -210,7 +210,7 @@ linphone_friend_list_add_friend(fl, testFriend); const MSList *friends = linphone_friend_list_get_friends(fl); - if ([LinphoneManager.instance lpConfigBoolForKey:@"fetch_native_contacts"]) { + if ([LinphoneManager.instance lpConfigBoolForKey:@"enable_native_address_book"]) { CNEntityType entityType = CNEntityTypeContacts; [store requestAccessForEntityType:entityType completionHandler:^(BOOL granted, NSError *_Nullable error) { BOOL success = FALSE; diff --git a/Resources/linphonerc-factory b/Resources/linphonerc-factory index 89c2077d6..db5ba7642 100644 --- a/Resources/linphonerc-factory +++ b/Resources/linphonerc-factory @@ -27,8 +27,8 @@ use_callkit=1 accept_early_media=0 -only_secure_chatrooms=0 -fetch_native_contacts=1 +force_lime_chat_rooms=0 +enable_native_address_book=1 [rtp] accept_any_encryption=1