From 2842122c58a9a5511d0cc75fe1132df0f9d477c6 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 7 Aug 2007 19:49:02 +0000 Subject: [PATCH] Monotone-Parent: 945fc1b3d54b7fde38f1c0b7d2a3452ba800e91a Monotone-Revision: eaaf9169ecb212d4b9b5ba9600d50e92f8d9e14e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-07T19:49:02 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ UI/Contacts/UIxContactFoldersView.m | 19 +++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93ede8750..c3d667884 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-08-07 Wolfgang Sourdeau + + * UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView + -_gcsFoldersFromFolder:): ignore the personal folders who are + returned but don't really exist. + 2007-08-02 Francis Lachapelle * UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView _responseForResults:]): diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 385a49554..ed6dcd9d4 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -205,15 +205,18 @@ if ([currentContactFolder isKindOfClass: [SOGoContactGCSFolder class]]) { - folderName = [NSString stringWithFormat: @"/Contacts/%@", - [currentContactFolder nameInContainer]]; - currentDictionary = [NSMutableDictionary new]; - [currentDictionary autorelease]; displayName = [[currentContactFolder ocsFolder] folderName]; - [currentDictionary setObject: displayName forKey: @"displayName"]; - [currentDictionary setObject: folderName forKey: @"name"]; - [currentDictionary setObject: @"contact" forKey: @"type"]; - [gcsFolders addObject: currentDictionary]; + if (displayName) + { + folderName = [NSString stringWithFormat: @"/Contacts/%@", + [currentContactFolder nameInContainer]]; + currentDictionary + = [NSMutableDictionary dictionaryWithCapacity: 3]; + [currentDictionary setObject: displayName forKey: @"displayName"]; + [currentDictionary setObject: folderName forKey: @"name"]; + [currentDictionary setObject: @"contact" forKey: @"type"]; + [gcsFolders addObject: currentDictionary]; + } } currentContactFolder = [contactSubfolders nextObject]; }