From db34f7922249920e54979b61280470f5436b984d Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 16 Jul 2010 16:13:05 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 05db10b383b8539c538b66c73af8db19b07dc441 Monotone-Revision: b10b8128ebc4881915a970495f64caebed8fa4e9 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-07-16T16:13:05 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ UI/Contacts/UIxContactEditor.m | 4 +++- UI/Contacts/UIxContactView.m | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34bc7b304..8a84869db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,11 @@ In secondaryEmail, we make sure that we loop in all available email address and we pick the first one that doesn't match the primaryEmail + * UI/Contacts/UIxContactEditor.m + UI/Contacts/UIxContactView.m - we make sure, + when excluding a type, that we reset the + local variable to nil since we might exclude + all values in our array. 2010-07-16 Wolfgang Sourdeau diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index 8702f268d..fda3af0d9 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -282,6 +282,8 @@ if (![ce hasAttribute: @"type" havingValue: aTypeToExclude]) break; + + value = nil; } } @@ -412,7 +414,7 @@ [self _setSnapshotValue: @"telephoneNumber" to: [self _simpleValueForType: @"work" inArray: elements excluding: @"fax"]]; [self _setSnapshotValue: @"homeTelephoneNumber" - to: [self _simpleValueForType: @"home" inArray: elements excluding: nil]]; + to: [self _simpleValueForType: @"home" inArray: elements excluding: @"fax"]]; [self _setSnapshotValue: @"mobile" to: [self _simpleValueForType: @"cell" inArray: elements excluding: nil]]; [self _setSnapshotValue: @"facsimileTelephoneNumber" diff --git a/UI/Contacts/UIxContactView.m b/UI/Contacts/UIxContactView.m index 77fe8d4f5..d052c46c6 100644 --- a/UI/Contacts/UIxContactView.m +++ b/UI/Contacts/UIxContactView.m @@ -228,6 +228,8 @@ if (![ce hasAttribute: @"type" havingValue: aTypeToExclude]) break; + + phone = nil; } } @@ -243,7 +245,7 @@ - (NSString *) homePhone { - return [self _phoneOfType: @"home" withLabel: @"Home:" excluding: nil]; + return [self _phoneOfType: @"home" withLabel: @"Home:" excluding: @"fax"]; } - (NSString *) fax