Fixed detecting encrypted messages

pull/175/head
M66B 5 years ago
parent edf77ebeb6
commit 28580ee9f1

@ -1712,10 +1712,13 @@ public class MessageHelper {
contentType = new ContentType(Helper.guessMimeType(filename)); contentType = new ContentType(Helper.guessMimeType(filename));
} }
if (!Part.ATTACHMENT.equalsIgnoreCase(disposition) && TextUtils.isEmpty(filename)) { boolean plain = "text/plain".equalsIgnoreCase(contentType.getBaseType());
if ("text/plain".equalsIgnoreCase(contentType.getBaseType())) boolean html = "text/html".equalsIgnoreCase(contentType.getBaseType());
if ((plain || html) &&
!Part.ATTACHMENT.equalsIgnoreCase(disposition) && TextUtils.isEmpty(filename)) {
if (plain)
parts.plain.add(part); parts.plain.add(part);
else if ("text/html".equalsIgnoreCase(contentType.getBaseType())) else if (html)
parts.html.add(part); parts.html.add(part);
} else { } else {
AttachmentPart apart = new AttachmentPart(); AttachmentPart apart = new AttachmentPart();

Loading…
Cancel
Save