mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 00:45:09 +00:00
Monotone-Parent: afb8a72eddabdfbaa3b6865a4ebc2398294e95c3
Monotone-Revision: 72951a15317b904c573f349f0cc5252a50749fd3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-08-12T20:10:28 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
2011-08-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailObject.m: (addFlags:, removeFlags:)
|
||||
release "coreInfos" rather than flagsCache, which has been
|
||||
obsoleted.
|
||||
(_hasFlag:): make use of "coreInfos" to fetch the flags since most
|
||||
of the time the other infos will be fetch for the same object,
|
||||
bringing a 30ms speedup per message.
|
||||
|
||||
* OpenChange/MAPIStoreTable.m (-setHandleId:): only register the
|
||||
table in the notification cache if the provided handle id is not
|
||||
null.
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
id coreInfos;
|
||||
id headerPart;
|
||||
NSDictionary *headers;
|
||||
NSArray *flagsCache;
|
||||
}
|
||||
|
||||
/* message */
|
||||
|
||||
@@ -96,7 +96,6 @@ static BOOL debugSoParts = NO;
|
||||
[headers release];
|
||||
[headerPart release];
|
||||
[coreInfos release];
|
||||
[flagsCache release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -805,21 +804,17 @@ static BOOL debugSoParts = NO;
|
||||
|
||||
/* flags */
|
||||
|
||||
- (void) _clearFlagsCache
|
||||
{
|
||||
[flagsCache release];
|
||||
flagsCache = nil;
|
||||
}
|
||||
|
||||
- (NSException *) addFlags: (id) _flags
|
||||
{
|
||||
[self _clearFlagsCache];
|
||||
[coreInfos release];
|
||||
coreInfos = nil;
|
||||
return [[self imap4Connection] addFlags:_flags toURL: [self imap4URL]];
|
||||
}
|
||||
|
||||
- (NSException *) removeFlags: (id) _flags
|
||||
{
|
||||
[self _clearFlagsCache];
|
||||
[coreInfos release];
|
||||
coreInfos = nil;
|
||||
return [[self imap4Connection] removeFlags:_flags toURL: [self imap4URL]];
|
||||
}
|
||||
|
||||
@@ -1285,19 +1280,10 @@ static BOOL debugSoParts = NO;
|
||||
- (BOOL) _hasFlag: (NSString *) flag
|
||||
{
|
||||
BOOL rc;
|
||||
NSDictionary *values;
|
||||
NSArray *flags;
|
||||
|
||||
if (!flagsCache)
|
||||
{
|
||||
values = [self _fetchProperty: @"FLAGS"];
|
||||
if (values)
|
||||
{
|
||||
flagsCache = [values objectForKey: @"flags"];
|
||||
[flagsCache retain];
|
||||
}
|
||||
}
|
||||
|
||||
rc = [flagsCache containsObject: flag];
|
||||
flags = [[self fetchCoreInfos] objectForKey: @"flags"];
|
||||
rc = [flags containsObject: flag];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user