See ChangeLog
Monotone-Parent: 5a6d160e6f9616edb725a40e08f24f0f0bf539b0 Monotone-Revision: 173ccf9cd4cd08cdc361da9d58df641be065e5a5 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-07-20T18:17:06maint-2.0.2
parent
5c618e5638
commit
f363ddf101
|
@ -1,3 +1,9 @@
|
|||
2012-07-20 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* UI/MailPartViewers/UIxMailRenderingContext.m
|
||||
(_shouldDisplayAsAttachment:): refactored to consider
|
||||
the "bodyId" parameter only for non text/* parts.
|
||||
|
||||
2012-07-20 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartHTMLViewer.m
|
||||
|
|
|
@ -32,22 +32,25 @@
|
|||
|
||||
@interface UIxMailRenderingContext (Private)
|
||||
|
||||
- (BOOL) _shouldDisplayAsAttachment: (NSDictionary *) info;
|
||||
|
||||
- (BOOL) _shouldDisplayAsAttachment: (NSDictionary *) info
|
||||
textPart: (BOOL) textPart;
|
||||
@end
|
||||
|
||||
@implementation UIxMailRenderingContext (Private)
|
||||
|
||||
- (BOOL) _shouldDisplayAsAttachment: (NSDictionary *) info
|
||||
textPart: (BOOL) textPart
|
||||
{
|
||||
NSString *s;
|
||||
BOOL shouldDisplay;
|
||||
|
||||
s = [[info objectForKey:@"disposition"] objectForKey: @"type"];
|
||||
|
||||
shouldDisplay = ((s && ([s caseInsensitiveCompare: @"ATTACHMENT"]
|
||||
== NSOrderedSame))
|
||||
|| [[info objectForKey: @"bodyId"] length]);
|
||||
shouldDisplay = (s && ([s caseInsensitiveCompare: @"ATTACHMENT"]
|
||||
== NSOrderedSame));
|
||||
|
||||
if (!shouldDisplay && !textPart)
|
||||
shouldDisplay = ([[info objectForKey: @"bodyId"] length] ? YES : NO);
|
||||
|
||||
return shouldDisplay;
|
||||
}
|
||||
|
@ -198,7 +201,7 @@ static BOOL showNamedTextAttachmentsInline = NO;
|
|||
else if ([mt isEqualToString:@"text"])
|
||||
{
|
||||
if ([st isEqualToString:@"plain"] || [st isEqualToString:@"html"]) {
|
||||
if (!showNamedTextAttachmentsInline && [self _shouldDisplayAsAttachment: _info])
|
||||
if (!showNamedTextAttachmentsInline && [self _shouldDisplayAsAttachment: _info textPart:YES])
|
||||
return [self linkViewer];
|
||||
|
||||
return [st isEqualToString:@"html"]
|
||||
|
@ -212,7 +215,7 @@ static BOOL showNamedTextAttachmentsInline = NO;
|
|||
// Tiffs aren't well-supported
|
||||
if ([mt isEqualToString:@"image"] && ![st isEqualToString: @"tiff"])
|
||||
{
|
||||
if ([self _shouldDisplayAsAttachment: _info])
|
||||
if ([self _shouldDisplayAsAttachment: _info textPart: NO])
|
||||
return [self linkViewer];
|
||||
|
||||
return [self imageViewer];
|
||||
|
|
Loading…
Reference in New Issue