Check whether the "INBOX" folder has the "noinferiors" flag set before declaring that it accepts subfolder creation

This commit is contained in:
Wolfgang Sourdeau
2012-09-26 11:50:28 -04:00
parent e837323c2e
commit 37ccb0875c
3 changed files with 39 additions and 5 deletions

View File

@@ -53,6 +53,7 @@
#import "MAPIStoreMailMessageTable.h"
#import "MAPIStoreMapping.h"
#import "MAPIStoreTypes.h"
#import "MAPIStoreUserContext.h"
#import "NSData+MAPIStore.h"
#import "NSString+MAPIStore.h"
#import "SOGoMAPIDBMessage.h"
@@ -408,7 +409,18 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
- (BOOL) supportsSubFolders
{
return YES;
BOOL supportsSubFolders;
MAPIStoreUserContext *userContext;
if ([[self nameInContainer] isEqualToString: @"folderINBOX"])
{
userContext = [self userContext];
supportsSubFolders = ![userContext inboxHasNoInferiors];
}
else
supportsSubFolders = YES;
return supportsSubFolders;
}
/* synchronisation */