Monotone-Parent: e84bf5143c772f6a25ca10b0bb98c3669df4fde6
Monotone-Revision: 58749c14c4e65b3991fa8ffd498965821ad031ce Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-14T17:26:48 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
22121220a1
commit
545e3a9bfc
|
@ -1,5 +1,10 @@
|
|||
2011-02-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreMailFolderTable.m
|
||||
(-getChildProperty:forKey:withTag:): compute propre response for
|
||||
PR_CONTENT_UNREAD, even though this will work only for subfolders
|
||||
and mapistore v2, neither of which is supported right now...
|
||||
|
||||
* SoObjects/Mailer/SOGoMailObject.m (-isNewMail, -replied)
|
||||
(-forwarded, -deleted): new accessors for the \Recent, \Answered,
|
||||
$Forwarded and \Deleted IMAP flags.
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <EOControl/EOQualifier.h>
|
||||
|
||||
#import <Mailer/SOGoMailFolder.h>
|
||||
|
||||
#import "NSString+MAPIStore.h"
|
||||
#import "NSValue+MAPIStore.h"
|
||||
#import "MAPIStoreTypes.h"
|
||||
|
@ -35,12 +41,22 @@
|
|||
withTag: (enum MAPITAGS) propTag
|
||||
{
|
||||
enum MAPISTATUS rc;
|
||||
|
||||
SOGoMailFolder *child;
|
||||
EOQualifier *searchQualifier;
|
||||
uint32_t intValue;
|
||||
|
||||
rc = MAPI_E_SUCCESS;
|
||||
switch (propTag)
|
||||
{
|
||||
case PR_CONTENT_UNREAD:
|
||||
*data = MAPILongValue (memCtx, 0);
|
||||
child = [self lookupChild: childKey];
|
||||
searchQualifier
|
||||
= [EOQualifier qualifierWithQualifierFormat: @"flags = %@ AND not flags = %@",
|
||||
@"unseen", @"deleted"];
|
||||
intValue = [[child fetchUIDsMatchingQualifier: searchQualifier
|
||||
sortOrdering: nil] count];
|
||||
[self logWithFormat: @"unread count for %@: %u\n", childKey, intValue];
|
||||
*data = MAPILongValue (memCtx, intValue);
|
||||
break;
|
||||
case PR_CONTAINER_CLASS_UNICODE:
|
||||
*data = [@"IPF.Note" asUnicodeInMemCtx: memCtx];
|
||||
|
|
Loading…
Reference in New Issue