From 0b87cd3479e56547520cbebfc8c5dd5c4acf4446 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 29 Nov 2007 21:10:39 +0000 Subject: [PATCH] Monotone-Parent: a09bb98f042f5485200b06b6f1b4c5b7c4d18f4a Monotone-Revision: 4ae4bf02420bd47acf6c83bbd0372f4d9ba89026 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-29T21:10:39 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/SOGoGCSFolder.m | 7 +++---- SoObjects/SOGo/SOGoParentFolder.m | 12 ++++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 1698d06d6..2e0a1c9c6 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -80,6 +80,8 @@ static NSString *defaultUserID = @""; newFolder = [self objectWithName: folderName inContainer: aContainer]; [newFolder setOCSPath: path]; [newFolder setOwner: login]; + if (![newFolder displayName]) + newFolder = nil; return newFolder; } @@ -88,10 +90,10 @@ static NSString *defaultUserID = @""; { if ((self = [super init])) { - displayName = nil; ocsPath = nil; ocsFolder = nil; aclCache = [NSMutableDictionary new]; + [self _fetchDisplayName]; } return self; @@ -164,9 +166,6 @@ static NSString *defaultUserID = @""; - (NSString *) displayName { - if (!displayName) - [self _fetchDisplayName]; - return displayName; } diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index c2b5c9b34..a0d7616a6 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -166,6 +166,11 @@ { } +- (void) _removeSubscribedSource: (NSString *) key +{ +#warning TO BE IMPLEMENTED SOON FIXME +} + - (void) appendSubscribedSources { NSArray *subscribedReferences; @@ -186,8 +191,11 @@ subscribedFolder = [subFolderClass folderWithSubscriptionReference: currentKey inContainer: self]; - [subFolders setObject: subscribedFolder - forKey: [subscribedFolder nameInContainer]]; + if (subscribedFolder) + [subFolders setObject: subscribedFolder + forKey: [subscribedFolder nameInContainer]]; + else + [self _removeSubscribedSource: currentKey]; currentKey = [allKeys nextObject]; } }