mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 08:34:30 +00:00
Monotone-Parent: c24e0fd5407c5155f41caca1fbb44c9686e3bc0f
Monotone-Revision: d9117c53c33a58d47b6b3993f78e09e431f47f96 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-08-15T19:01:24 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2012-08-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreMailFolder.m (-addProperties:): make use of
|
||||
the new methods below when a mail folder has been renamed, as this
|
||||
operation affects the url of mail objects.
|
||||
|
||||
* OpenChange/SOGoMAPIDBObject.m (-setNameInContainer): update the
|
||||
object record in the database to reflect the change of folder
|
||||
name.
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#import "MAPIStoreAppointmentWrapper.h"
|
||||
#import "MAPIStoreContext.h"
|
||||
#import "MAPIStoreFAIMessage.h"
|
||||
#import "MAPIStoreMailContext.h"
|
||||
#import "MAPIStoreMailMessageTable.h"
|
||||
#import "MAPIStoreMapping.h"
|
||||
#import "MAPIStoreTypes.h"
|
||||
@@ -110,7 +111,7 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
|
||||
|
||||
- (void) addProperties: (NSDictionary *) newProperties
|
||||
{
|
||||
NSString *newDisplayName;
|
||||
NSString *newDisplayName, *newNameInContainer;
|
||||
NSMutableDictionary *propsCopy;
|
||||
NSNumber *key;
|
||||
uint64_t fid;
|
||||
@@ -124,7 +125,12 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
|
||||
{
|
||||
fid = [self objectId];
|
||||
[(SOGoMailFolder *) sogoObject renameTo: newDisplayName];
|
||||
newNameInContainer = [sogoObject nameInContainer];
|
||||
if (!container)
|
||||
[(MAPIStoreMailContext *) context
|
||||
updateURLWithFolderName: newNameInContainer];
|
||||
[[self mapping] updateID: fid withURL: [self url]];
|
||||
[dbFolder setNameInContainer: newNameInContainer];
|
||||
[self cleanupCaches];
|
||||
|
||||
propsCopy = [newProperties mutableCopy];
|
||||
|
||||
Reference in New Issue
Block a user