oc-mail: return soft-deleted mails while syncing
As well as hard deleted As explained in [MS-OXCFXICS] Section 2.2.1.3.1, the property MetaTagIdsetDeleted must include both types of messages and this idset is filled with the return value of this message.pull/65/head
parent
09aed26f10
commit
06476abdf7
|
@ -1009,6 +1009,7 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||||
NSString *changeNumber;
|
NSString *changeNumber;
|
||||||
uint64_t modseq;
|
uint64_t modseq;
|
||||||
NSDictionary *versionProperties;
|
NSDictionary *versionProperties;
|
||||||
|
EOQualifier *deletedQualifier, *kvQualifier, *searchQualifier;
|
||||||
|
|
||||||
if (tableType == MAPISTORE_MESSAGE_TABLE)
|
if (tableType == MAPISTORE_MESSAGE_TABLE)
|
||||||
{
|
{
|
||||||
|
@ -1017,8 +1018,33 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||||
unsignedLongLongValue];
|
unsignedLongLongValue];
|
||||||
if (modseq > 0)
|
if (modseq > 0)
|
||||||
{
|
{
|
||||||
|
/* Hard deleted items */
|
||||||
deletedUIDs = [(SOGoMailFolder *) sogoObject
|
deletedUIDs = [(SOGoMailFolder *) sogoObject
|
||||||
fetchUIDsOfVanishedItems: modseq];
|
fetchUIDsOfVanishedItems: modseq];
|
||||||
|
|
||||||
|
/* Soft deleted items */
|
||||||
|
kvQualifier = [[EOKeyValueQualifier alloc]
|
||||||
|
initWithKey: @"modseq"
|
||||||
|
operatorSelector: EOQualifierOperatorGreaterThanOrEqualTo
|
||||||
|
value: [NSNumber numberWithUnsignedLongLong: modseq]];
|
||||||
|
deletedQualifier
|
||||||
|
= [[EOKeyValueQualifier alloc]
|
||||||
|
initWithKey: @"FLAGS"
|
||||||
|
operatorSelector: EOQualifierOperatorContains
|
||||||
|
value: [NSArray arrayWithObject: @"Deleted"]];
|
||||||
|
|
||||||
|
searchQualifier = [[EOAndQualifier alloc]
|
||||||
|
initWithQualifiers:
|
||||||
|
kvQualifier, deletedQualifier, nil];
|
||||||
|
|
||||||
|
deletedUIDs = [deletedUIDs arrayByAddingObjectsFromArray:
|
||||||
|
[sogoObject fetchUIDsMatchingQualifier: searchQualifier
|
||||||
|
sortOrdering: nil]];
|
||||||
|
|
||||||
|
[deletedQualifier release];
|
||||||
|
[kvQualifier release];
|
||||||
|
[searchQualifier release];
|
||||||
|
|
||||||
deletedKeys = [deletedUIDs stringsWithFormat: @"%@.eml"];
|
deletedKeys = [deletedUIDs stringsWithFormat: @"%@.eml"];
|
||||||
if ([deletedUIDs count] > 0)
|
if ([deletedUIDs count] > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue