From d46979057e2f282e44486b36eddf7a44102acc80 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 25 Feb 2013 16:54:47 +0100 Subject: [PATCH] Add configuration parameter to enable display of email addresses in contacts list. --- Classes/ContactDetailsTableViewController.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Classes/ContactDetailsTableViewController.m b/Classes/ContactDetailsTableViewController.m index 5ed4a0309..1ac0bf331 100644 --- a/Classes/ContactDetailsTableViewController.m +++ b/Classes/ContactDetailsTableViewController.m @@ -141,7 +141,11 @@ static const int contactSections[ContactSections_MAX] = {ContactSections_None, C } else if(contactSections[section] == ContactSections_Sip) { return [dataCache objectAtIndex:1]; } else if(contactSections[section] == ContactSections_Email) { - return [dataCache objectAtIndex:2]; + if ([[LinphoneManager instance] lpConfigBoolForKey:@"show_contacts_emails_preference"] == true) { + return [dataCache objectAtIndex:2]; + } else { + return nil; + } } return nil; } @@ -213,6 +217,7 @@ static const int contactSections[ContactSections_MAX] = {ContactSections_None, C } // Email + if ([[LinphoneManager instance] lpConfigBoolForKey:@"show_contacts_emails_preference"] == true) { ABMultiValueRef lMap = ABRecordCopyValue(contact, kABPersonEmailProperty); NSMutableArray *subArray = [NSMutableArray array];