Commit 8eaa0f5e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent a725ca3e
......@@ -25,15 +25,16 @@ using namespace MessageViewer;
static AttachmentStrategy::Display smartDisplay(KMime::Content *node)
{
const auto cd = node->contentDisposition(false);
if (cd && cd->disposition() == KMime::Headers::CDinline) {
if (cd) {
if (cd->disposition() == KMime::Headers::CDinline) {
// explict "inline" disposition:
return AttachmentStrategy::Inline;
}
if (cd && cd->disposition() == KMime::Headers::CDattachment) {
if (cd->disposition() == KMime::Headers::CDattachment) {
// explicit "attachment" disposition:
return AttachmentStrategy::AsIcon;
}
}
const auto ct = node->contentType(false);
if (ct && ct->isText() && ct->name().trimmed().isEmpty() && (!cd || cd->filename().trimmed().isEmpty())) {
......
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