mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-17 12:35:57 +00:00
Implemented a mechanism to preload body parts for email messages
This commit is contained in:
@@ -240,7 +240,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||
if (!headerSetup)
|
||||
[self _fetchHeaderData];
|
||||
|
||||
if (mimeKey)
|
||||
if (!bodyContent && mimeKey)
|
||||
{
|
||||
result = [sogoObject fetchParts: [NSArray arrayWithObject: mimeKey]];
|
||||
result = [[result valueForKey: @"RawResponse"] objectForKey: @"fetch"];
|
||||
@@ -1550,6 +1550,31 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (NSString *) bodyContentPartKey
|
||||
{
|
||||
NSString *bodyPartKey;
|
||||
|
||||
if (!headerSetup)
|
||||
[self _fetchHeaderData];
|
||||
|
||||
if ([mimeKey hasPrefix: @"body.peek"])
|
||||
bodyPartKey = [NSString stringWithFormat: @"body[%@]",
|
||||
[mimeKey _strippedBodyKey]];
|
||||
else
|
||||
bodyPartKey = mimeKey;
|
||||
|
||||
return bodyPartKey;
|
||||
}
|
||||
|
||||
- (void) setBodyContentFromRawData: (NSData *) rawContent
|
||||
{
|
||||
if (!headerSetup)
|
||||
[self _fetchHeaderData];
|
||||
|
||||
ASSIGN (bodyContent, [rawContent bodyDataFromEncoding: headerEncoding]);
|
||||
bodySetup = YES;
|
||||
}
|
||||
|
||||
- (void) save
|
||||
{
|
||||
NSNumber *value;
|
||||
|
||||
Reference in New Issue
Block a user