summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mimetreeparser/textplain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/textplain.cpp')
-rw-r--r--framework/src/domain/mime/mimetreeparser/textplain.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/textplain.cpp b/framework/src/domain/mime/mimetreeparser/textplain.cpp
index 32201a8a..d62cb2cf 100644
--- a/framework/src/domain/mime/mimetreeparser/textplain.cpp
+++ b/framework/src/domain/mime/mimetreeparser/textplain.cpp
@@ -41,13 +41,12 @@ const Interface::BodyPartFormatter *TextPlainBodyPartFormatter::create()
41MessagePart::Ptr TextPlainBodyPartFormatter::process(Interface::BodyPart &part) const 41MessagePart::Ptr TextPlainBodyPartFormatter::process(Interface::BodyPart &part) const
42{ 42{
43 KMime::Content *node = part.content(); 43 KMime::Content *node = part.content();
44 const bool isFirstTextPart = (node->topLevel()->textContent() == node);
45 44
46 TextMessagePart::Ptr mp; 45 TextMessagePart::Ptr mp;
47 if (isFirstTextPart) { 46 if (KMime::isAttachment(node)) {
48 mp = TextMessagePart::Ptr(new TextMessagePart(part.objectTreeParser(), node)); 47 mp = AttachmentMessagePart::Ptr(new AttachmentMessagePart(part.objectTreeParser(), node));
49 } else { 48 } else {
50 mp = TextMessagePart::Ptr(new AttachmentMessagePart(part.objectTreeParser(), node)); 49 mp = TextMessagePart::Ptr(new TextMessagePart(part.objectTreeParser(), node));
51 } 50 }
52 51
53 return mp; 52 return mp;