Improve allContactSearch action

We now index results using the first email address of each contact,
which improves the identification of duplicated entries.
This commit is contained in:
Francis Lachapelle
2018-07-06 14:03:50 -04:00
parent c4c1de771c
commit 1892aafae4
+4 -1
View File
@@ -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"]