mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Add contact with only number and presence to filter, open contactListView on ContactsAll
This commit is contained in:
parent
844a9839c3
commit
c5caf03513
2 changed files with 8 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue