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 = != content;
// Pass control to the OTP now, which does the real work
mNodeHelper->setNodeUnprocessed(, true);
MailViewerSource otpSource(this);
MimeTreeParser::ObjectTreeParser otp(&otpSource, mNodeHelper);
// TODO: needs to end up in renderer: != content /* show only single node */);
otp.parseObjectTree(content, != content /* parse/show only single node */);
otp.parseObjectTree(content, onlySingleNode);
if (message) {
htmlWriter()->write(writeMessageHeader(message, hasVCard ? vCardContent : nullptr, true));
otpSource.render(otp.parsedPart(), != 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