Commit 32183302 authored by Sandro Knauß's avatar Sandro Knauß 🐝
Browse files

Refactor(messageviewer): Use onlySingleNode instead of direct boolean check.

parent 280229d4
......@@ -830,20 +830,21 @@ void ViewerPrivate::parseContent(KMime::Content *content)
}
auto *message = dynamic_cast<KMime::Message *>(content);
bool onlySingleNode = mMessage.data() != content;
// Pass control to the OTP now, which does the real work
mNodeHelper->setNodeUnprocessed(mMessage.data(), true);
MailViewerSource otpSource(this);
MimeTreeParser::ObjectTreeParser otp(&otpSource, mNodeHelper);
// TODO: needs to end up in renderer: mMessage.data() != content /* show only single node */);
otp.setAllowAsync(!mPrinting);
otp.parseObjectTree(content, mMessage.data() != content /* parse/show only single node */);
otp.parseObjectTree(content, onlySingleNode);
htmlWriter()->setCodec(otp.plainTextContentCharset());
if (message) {
htmlWriter()->write(writeMessageHeader(message, hasVCard ? vCardContent : nullptr, true));
}
otpSource.render(otp.parsedPart(), mMessage.data() != content /* parse/show only single node */);
otpSource.render(otp.parsedPart(), onlySingleNode);
// TODO: Setting the signature state to nodehelper is not enough, it should actually
// be added to the store, so that the message list correctly displays the signature state
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment