oc-mail: Use body.peek to preload message bodies

In this way, we do not modify the flags (\Seen) on preloading.
The IMAP server returns the content without .peek section so
it is removed.

This also performs the modification intended by the following
Pull Request:

https://github.com/Zentyal/sogo/pull/50

That tried to avoid set \Seen flag when preloading message bodies
on synchronisation. But in this case we are not incrementing the
modseq as we are not modifying any messages flags.
This commit is contained in:
Enrique J. Hernández Blasco
2015-03-13 09:34:21 +01:00
parent f048860729
commit 1c1a75d2c1
3 changed files with 11 additions and 5 deletions

View File

@@ -1627,11 +1627,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
if (!headerSetup)
[self _fetchHeaderData];
if ([mimeKey hasPrefix: @"body.peek"])
bodyPartKey = [NSString stringWithFormat: @"body[%@]",
[mimeKey _strippedBodyKey]];
else
bodyPartKey = mimeKey;
bodyPartKey = mimeKey;
return bodyPartKey;
}