diff --git a/Classes/ContactsListTableView.m b/Classes/ContactsListTableView.m index c88351e36..d02b6e319 100644 --- a/Classes/ContactsListTableView.m +++ b/Classes/ContactsListTableView.m @@ -118,7 +118,6 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) { for (NSString *addr in LinphoneManager.instance.fastAddressBook.addressBookMap) { Contact *contact = [LinphoneManager.instance.fastAddressBook.addressBookMap objectForKey:addr]; - BOOL add = true; // Do not add the contact directly if we set some filter @@ -128,6 +127,11 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) { if ([FastAddressBook contactHasValidSipDomain:contact]) { add = true; } + if (contact.friend && linphone_presence_model_get_basic_status(linphone_friend_get_presence_model(contact.friend)) == LinphonePresenceBasicStatusOpen){ + add = true; + } + + if (!add && [ContactSelection emailFilterEnabled]) { // Add this contact if it has an email add = (contact.emails.count > 0); diff --git a/Classes/ContactsListView.m b/Classes/ContactsListView.m index cedd07fdc..50278b783 100644 --- a/Classes/ContactsListView.m +++ b/Classes/ContactsListView.m @@ -106,10 +106,10 @@ static UICompositeViewDescription *compositeDescription = nil; - (void)viewDidLoad { [super viewDidLoad]; tableController.tableView.accessibilityIdentifier = @"Contacts table"; - [self changeView:ContactsLinphone]; - if ([tableController totalNumberOfItems] == 0) { + [self changeView:ContactsAll]; + /*if ([tableController totalNumberOfItems] == 0) { [self changeView:ContactsAll]; - } + }*/ } - (void)viewWillAppear:(BOOL)animated {