Commit f9917f65 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix show attachment as reported by David.

There is a problem in some email where we can"t detect as it has an
attachment.
parent 699120d0
......@@ -352,10 +352,10 @@ QString GrantleeHeaderFormatter::format(const QString &absolutePath, const Grant
headerObject.insert(QStringLiteral("vcardi18n"), i18n("[vcard]"));
headerObject.insert(QStringLiteral("readOnlyMessage"), style->readOnlyMessage());
const bool messageHasAttachment = KMime::hasAttachment(message);
const QString attachmentHtml = style->attachmentHtml();
const bool messageHasAttachment = KMime::hasAttachment(message) || !attachmentHtml.isEmpty();
headerObject.insert(QStringLiteral("hasAttachment"), messageHasAttachment);
headerObject.insert(QStringLiteral("attachmentHtml"), style->attachmentHtml());
headerObject.insert(QStringLiteral("attachmentHtml"), attachmentHtml);
if (messageHasAttachment) {
const QString iconPath
......
......@@ -80,7 +80,7 @@
{% endif %}
</div>
{% if header.hasAttachment %}
<div>{{ header.attachmentHtml|safe }}</div>
<div>{{ header.attachmentHtml|safe }}</div>
{% endif %}
</div>
</div>
......
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