From a0de2d52f719804768ad54aab67195d11a253a08 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 22 Aug 2008 21:49:37 +0000 Subject: [PATCH] Monotone-Parent: 7e1e7d720fbae9469e69ee665a26293d48382280 Monotone-Revision: f36908690fb1287e17d7bb0eb4155ddc4c6f6a55 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-22T21:49:37 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/MailPartViewers/UIxMailRenderingContext.m | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca042d493..a78801b0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-08-22 Wolfgang Sourdeau + * UI/MailPartViewers/UIxMailRenderingContext.m + ([UIxMailRenderingContext -viewerForBodyInfo:_info]): display + parts with a bodyId as an attachment. + * UI/Contacts/UIxContactView.m ([UIxContactView -workUrl]) ([UIxContactView -homeUrl]): the test for the presence of a protocol was inverted, causing the output of wrong urls anyway... diff --git a/UI/MailPartViewers/UIxMailRenderingContext.m b/UI/MailPartViewers/UIxMailRenderingContext.m index 5e275adfd..bcc7a26fe 100644 --- a/UI/MailPartViewers/UIxMailRenderingContext.m +++ b/UI/MailPartViewers/UIxMailRenderingContext.m @@ -40,10 +40,15 @@ - (BOOL) _shouldDisplayAsAttachment: (NSDictionary *) info { NSString *s; + BOOL shouldDisplay; s = [[info objectForKey:@"disposition"] objectForKey: @"type"]; - - return (s && [s caseInsensitiveCompare: @"ATTACHMENT"] == NSOrderedSame); + + shouldDisplay = ((s && ([s caseInsensitiveCompare: @"ATTACHMENT"] + == NSOrderedSame)) + || [[info objectForKey: @"bodyId"] length]); + + return shouldDisplay; } @end