improved GetItemEstimate to count all vasnished/deleted mails too

pull/74/merge
Ludovic Marcotte 2015-03-23 11:35:45 -04:00
parent 9eb138b867
commit 67139ce3e3
2 changed files with 6 additions and 16 deletions

View File

@ -1166,27 +1166,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
if (folderType == ActiveSyncMailFolder) if (folderType == ActiveSyncMailFolder)
{ {
EOQualifier *notDeletedQualifier, *sinceDateQualifier;
EOAndQualifier *qualifier;
NSCalendarDate *filter; NSCalendarDate *filter;
NSArray *uids; NSString *syncKey;
NSArray *allMessages;
filter = [NSCalendarDate dateFromFilterType: [[(id)[[allCollections objectAtIndex: j] getElementsByTagName: @"FilterType"] lastObject] textValue]]; filter = [NSCalendarDate dateFromFilterType: [[(id)[[allCollections objectAtIndex: j] getElementsByTagName: @"FilterType"] lastObject] textValue]];
syncKey = [[(id)[[allCollections objectAtIndex: j] getElementsByTagName: @"SyncKey"] lastObject] textValue];
notDeletedQualifier = [EOQualifier qualifierWithQualifierFormat: allMessages = [currentCollection syncTokenFieldsWithProperties: nil matchingSyncToken: syncKey fromDate: filter];
@"(not (flags = %@))",
@"deleted"];
sinceDateQualifier = [EOQualifier qualifierWithQualifierFormat:
@"(DATE >= %@)", filter];
qualifier = [[EOAndQualifier alloc] initWithQualifiers: notDeletedQualifier, sinceDateQualifier,
nil];
AUTORELEASE(qualifier);
uids = [currentCollection fetchUIDsMatchingQualifier: qualifier count = [allMessages count];
sortOrdering: @"REVERSE ARRIVAL"
threaded: NO];
count = [uids count];
// Add the number of UIDs expected to "soft delete" // Add the number of UIDs expected to "soft delete"
count += [self _softDeleteCountWithFilter: filter collectionId: nameInCache]; count += [self _softDeleteCountWithFilter: filter collectionId: nameInCache];

1
NEWS
View File

@ -24,6 +24,7 @@ Bug fixes
- fixed Language-Region tags in Web interface (#3121) - fixed Language-Region tags in Web interface (#3121)
- properly fallback over EAS to UTF-8 and then Latin1 for messages w/o charset (#3103) - properly fallback over EAS to UTF-8 and then Latin1 for messages w/o charset (#3103)
- prevent potential freebusy lookup crashes during timezone changes with repetitive events - prevent potential freebusy lookup crashes during timezone changes with repetitive events
- improved GetItemEstimate to count all vasnished/deleted mails too
2.2.16 (2015-02-12) 2.2.16 (2015-02-12)
------------------- -------------------