mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
(fix) small optimizations + code cosmetics
This commit is contained in:
@@ -872,7 +872,9 @@ FIXME
|
||||
// FIXME: handle errors here
|
||||
if (deletesAsMoves && theFolderType == ActiveSyncMailFolder)
|
||||
{
|
||||
[(SOGoMailFolder *)[sogoObject container] deleteUIDs: [NSArray arrayWithObjects: serverId, nil] useTrashFolder: &useTrash inContext: context];
|
||||
[(SOGoMailFolder *)[sogoObject container] deleteUIDs: [NSArray arrayWithObjects: serverId, nil]
|
||||
useTrashFolder: &useTrash
|
||||
inContext: context];
|
||||
}
|
||||
else if (theFolderType == ActiveSyncEventFolder || theFolderType == ActiveSyncTaskFolder || theFolderType == ActiveSyncContactFolder)
|
||||
{
|
||||
@@ -1449,7 +1451,10 @@ FIXME
|
||||
}
|
||||
}
|
||||
|
||||
allMessages = [theCollection syncTokenFieldsWithProperties: nil matchingSyncToken: theSyncKey fromDate: theFilterType initialLoad: initialLoadInProgress];
|
||||
allMessages = [theCollection syncTokenFieldsWithProperties: nil
|
||||
matchingSyncToken: theSyncKey
|
||||
fromDate: theFilterType
|
||||
initialLoad: initialLoadInProgress];
|
||||
max = [allMessages count];
|
||||
|
||||
allCacheObjects = [NSMutableArray array];
|
||||
|
||||
@@ -2390,6 +2390,11 @@ void handle_eas_terminate(int signum)
|
||||
realCollectionId = [collectionId realCollectionIdWithFolderType: &folderType];
|
||||
realCollectionId = [self globallyUniqueIDToIMAPFolderName: realCollectionId type: folderType];
|
||||
|
||||
// We avoid loading the cache metadata if we can't get the real connection. This can happen
|
||||
// for example if the IMAP server is down. We just skip the folder for now.
|
||||
if (!realCollectionId)
|
||||
continue;
|
||||
|
||||
if (folderType == ActiveSyncMailFolder)
|
||||
folderMetadata = [self _folderMetadataForKey: [NSString stringWithFormat: @"folder%@", [[collectionId stringByUnescapingURL] substringFromIndex:5]]];
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user