From 1892aafae49b72b5fea435d8ed33f6067a108a2a Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 6 Jul 2018 14:03:50 -0400 Subject: [PATCH] Improve allContactSearch action We now index results using the first email address of each contact, which improves the identification of duplicated entries. --- UI/Contacts/UIxContactFoldersView.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index d100faee3..c82f748f7 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -206,7 +206,10 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK; for (j = 0; j < [contacts count]; j++) { contact = [contacts objectAtIndex: j]; - mail = [contact objectForKey: @"c_mail"]; + if ([[contact objectForKey: @"emails"] count] == 0) + // Contact must have an email address + continue; + mail = [[[contact objectForKey: @"emails"] objectAtIndex: 0] objectForKey: @"value"]; //NSLog(@" found %@ (%@) ? %@", [contact objectForKey: @"c_name"], mail, // [contact description]); if (!excludeLists && [[contact objectForKey: @"c_component"]