mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-21 14:43:31 +00:00
Monotone-Parent: a164259525f718f804b625a9f09b4c3b3c9e83f8
Monotone-Revision: 11f4bdac420d36e45b12ca5d1d393ec34f43c609 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-10T00:02:30 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -735,8 +735,22 @@ static BOOL debugSoParts = NO;
|
||||
{
|
||||
// TODO: we might want to check for existence prior controller creation
|
||||
Class clazz;
|
||||
|
||||
clazz = [SOGoMailBodyPart bodyPartClassForKey:_key inContext:_ctx];
|
||||
NSArray *parts;
|
||||
int part;
|
||||
NSDictionary *partDesc;
|
||||
NSString *mimeType;
|
||||
|
||||
parts = [[self bodyStructure] objectForKey: @"parts"];
|
||||
part = [_key intValue] - 1;
|
||||
if (part > -1 && part < [parts count])
|
||||
{
|
||||
partDesc = [parts objectAtIndex: part];
|
||||
mimeType = [[partDesc keysWithFormat: @"%{type}/%{subtype}"] lowercaseString];
|
||||
clazz = [SOGoMailBodyPart bodyPartClassForMimeType: mimeType
|
||||
inContext: _ctx];
|
||||
}
|
||||
else
|
||||
clazz = Nil;
|
||||
|
||||
return [clazz objectWithName:_key inContainer: self];
|
||||
}
|
||||
@@ -755,7 +769,7 @@ static BOOL debugSoParts = NO;
|
||||
|
||||
if ([self isBodyPartKey:_key inContext:_ctx]) {
|
||||
if ((obj = [self lookupImap4BodyPartKey:_key inContext:_ctx]) != nil) {
|
||||
if (debugSoParts)
|
||||
if (debugSoParts)
|
||||
[self logWithFormat: @"mail looked up part %@: %@", _key, obj];
|
||||
return obj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user