Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
32183302
Commit
32183302
authored
Dec 17, 2020
by
Sandro Knauß
🐝
Browse files
Refactor(messageviewer): Use onlySingleNode instead of direct boolean check.
parent
280229d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
messageviewer/src/viewer/viewer_p.cpp
View file @
32183302
...
...
@@ -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
s
ingle
n
ode
*/
);
otp
.
parseObjectTree
(
content
,
only
S
ingle
N
ode
);
htmlWriter
()
->
setCodec
(
otp
.
plainTextContentCharset
());
if
(
message
)
{
htmlWriter
()
->
write
(
writeMessageHeader
(
message
,
hasVCard
?
vCardContent
:
nullptr
,
true
));
}
otpSource
.
render
(
otp
.
parsedPart
(),
mMessage
.
data
()
!=
content
/* parse/show
only
s
ingle
n
ode
*/
);
otpSource
.
render
(
otp
.
parsedPart
(),
only
S
ingle
N
ode
);
// 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment