From 90cb4730a43ed9b9ef01cdc697af47444679897d Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 11 Sep 2007 20:27:13 +0000 Subject: [PATCH] Monotone-Parent: 763d7579a98e9af74a10d6369344af9e5e9a574b Monotone-Revision: cdf13b5c1ef576b104b53f12fc364017defa9f0e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-11T20:27:13 Monotone-Branch: ca.inverse.sogo --- UI/Contacts/UIxContactFoldersView.m | 14 ++++++++------ UI/Contacts/UIxContactsListViewContainer.m | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 1509f4a52..fa47cb91e 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -52,8 +52,7 @@ WORequest *request; folders = [self clientObject]; - action = [NSString stringWithFormat: @"../%@/%@", - [folders defaultSourceName], + action = [NSString stringWithFormat: @"../personal/%@", actionName]; request = [[self context] request]; @@ -82,7 +81,11 @@ name = [self queryParameterForKey: @"name"]; if ([name length] > 0) - response = [[self clientObject] newFolderWithName: name]; + { + response = [[self clientObject] newFolderWithName: name]; + if (!response) + response = [self responseWith204]; + } else response = [NSException exceptionWithHTTPStatus: 400 reason: @"The name is missing"]; @@ -111,8 +114,7 @@ { uid = [currentContact objectForKey: @"c_uid"]; if (uid && ![results objectForKey: uid]) - [results setObject: currentContact - forKey: uid]; + [results setObject: currentContact forKey: uid]; currentContact = [folderResults nextObject]; } } @@ -202,7 +204,7 @@ gcsFolders = [NSMutableArray new]; [gcsFolders autorelease]; - contactSubfolders = [[contactFolders contactFolders] objectEnumerator]; + contactSubfolders = [[contactFolders subFolders] objectEnumerator]; currentContactFolder = [contactSubfolders nextObject]; while (currentContactFolder) { diff --git a/UI/Contacts/UIxContactsListViewContainer.m b/UI/Contacts/UIxContactsListViewContainer.m index 2bf4f0c09..5aab0c6d7 100644 --- a/UI/Contacts/UIxContactsListViewContainer.m +++ b/UI/Contacts/UIxContactsListViewContainer.m @@ -29,6 +29,7 @@ #import #import +#import #import "UIxContactsListViewContainer.h" @@ -115,7 +116,7 @@ folderContainer = [[self clientObject] container]; - return [folderContainer contactFolders]; + return [folderContainer subFolders]; } - (NSString *) currentContactFolderId