From aa3c02be930ef6d5b55897a33184b5b58fde0ba1 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 7 Sep 2017 16:30:22 -0400 Subject: [PATCH] Fix to save many postal addresses of tge same type Fixes #4091 --- NEWS | 1 + UI/Contacts/UIxContactEditor.m | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3225b0ac3..0913af4a0 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Bug fixes - [web] attachments are not displayed on IOS (#4150) - [web] fixed parsing of pasted email addresses from Spreadsheet (#4258) - [web] messages list not accessible when changing mailbox in expanded mail view (#4269) + - [web] only one postal address of same type is saved (#4091) - [eas] hebrew folders encoding problem using EAS (#4240) 3.2.10 (2017-07-05) diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index 60f1e4756..4c30403a6 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -381,7 +381,8 @@ static Class SOGoContactGCSEntryK = Nil; o = [values objectAtIndex: i]; if ([o isKindOfClass: [NSDictionary class]]) { - element = [card elementWithTag: @"adr" ofType: [o objectForKey: @"type"]]; + element = [CardElement elementWithTag: @"adr"]; + [element addType: [o objectForKey: @"type"]]; [element setSingleValue: [o objectForKey: @"postoffice"] atIndex: 0 forKey: @""]; [element setSingleValue: [o objectForKey: @"street2"] @@ -396,6 +397,7 @@ static Class SOGoContactGCSEntryK = Nil; atIndex: 5 forKey: @""]; [element setSingleValue: [o objectForKey: @"country"] atIndex: 6 forKey: @""]; + [card addChild: element]; } } }