oc-mail: Flush IMAP hierarchy cache to update Outlook folders
This fixes two scenarios: * An IMAP subfolder has updated its hierarchy when it is asked to be synchronised * An IMAP root folder is created on Outlook when you logon. OpenChange changes are required to be refreshed on synchronisation.pull/84/head
parent
dc5237e92e
commit
2d65b75b56
|
@ -146,6 +146,9 @@ MakeDisplayFolderName (NSString *folderName)
|
||||||
DLIST_ADD_END (firstContext, context, void);
|
DLIST_ADD_END (firstContext, context, void);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: Flush any cache before retrieving the hierarchy */
|
||||||
|
[accountFolder flushMailCaches];
|
||||||
|
|
||||||
secondaryFolders = [[accountFolder toManyRelationshipKeysWithNamespaces: NO]
|
secondaryFolders = [[accountFolder toManyRelationshipKeysWithNamespaces: NO]
|
||||||
mutableCopy];
|
mutableCopy];
|
||||||
[secondaryFolders autorelease];
|
[secondaryFolders autorelease];
|
||||||
|
|
|
@ -368,6 +368,11 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
|
||||||
if (sortOrderings)
|
if (sortOrderings)
|
||||||
[self errorWithFormat: @"sort orderings are not used for folders"];
|
[self errorWithFormat: @"sort orderings are not used for folders"];
|
||||||
|
|
||||||
|
/* FIXME: Flush any cache before retrieving the hierarchy, this
|
||||||
|
slows things down but it is safer */
|
||||||
|
if (!qualifier)
|
||||||
|
[sogoObject flushMailCaches];
|
||||||
|
|
||||||
subfolderKeys = [[sogoObject toManyRelationshipKeys] mutableCopy];
|
subfolderKeys = [[sogoObject toManyRelationshipKeys] mutableCopy];
|
||||||
[subfolderKeys autorelease];
|
[subfolderKeys autorelease];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue