mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -05:00
First bits of infrastructure for not showing HTML-mail inline images as
downloadable attachments
This commit is contained in:
parent
65e318a80e
commit
75b8487024
@ -1803,6 +1803,22 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
String contentType = MimeUtility.unfoldAndDecode(part.getContentType());
|
||||
String contentDisposition = MimeUtility.unfoldAndDecode(part.getDisposition());
|
||||
String name = MimeUtility.getHeaderParameter(contentType, "name");
|
||||
|
||||
|
||||
// Inline parts with a content-id are almost certainly components of an HTML message
|
||||
// not attachments. Don't show attachment download buttons for them.
|
||||
//
|
||||
// TODO: This code won't work until we correct attachment storage
|
||||
|
||||
if ("inline".equalsIgnoreCase(MimeUtility.getHeaderParameter(contentDisposition, null))
|
||||
&& part.getHeader("Content-Id") != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (name == null)
|
||||
{
|
||||
name = MimeUtility.getHeaderParameter(contentDisposition, "filename");
|
||||
|
Loading…
Reference in New Issue
Block a user