From c910192da56948f0c1052fbffbe89c92687780a9 Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Fri, 10 Nov 2017 14:49:01 +0100 Subject: [PATCH] [CNContact] CNContact fix Contact detail edition add only one email/phone --- Classes/ContactDetailsTableView.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/ContactDetailsTableView.m b/Classes/ContactDetailsTableView.m index 5cf4daa2d..97657c64e 100644 --- a/Classes/ContactDetailsTableView.m +++ b/Classes/ContactDetailsTableView.m @@ -75,12 +75,16 @@ - (void)addEntry:(UITableView *)tableview section:(NSInteger)section animated:(BOOL)animated value:(NSString *)value { bool added = FALSE; if (section == ContactSections_Number) { + if ([_contact.phones count] == + [_contact.person.phoneNumbers count]) added = [_contact addPhoneNumber:value]; } else if (section == ContactSections_Sip) { if ([_contact.sipAddresses count] == [_contact.person.instantMessageAddresses count]) added = [_contact addSipAddress:value]; } else if (section == ContactSections_Email) { + if ([_contact.emails count] == + [_contact.person.emailAddresses count]) added = [_contact addEmail:value]; } if (added) {