Commit e9c579ea authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 41c43a51
......@@ -206,12 +206,13 @@ void MessageComposer::ComposerViewBase::setMessage(const KMime::Message::Ptr &ms
}
// Set the HTML text and collect HTML images
if (!otp.htmlContent().isEmpty()) {
m_editor->setHtml(otp.htmlContent());
const QString htmlContent = otp.htmlContent();
if (htmlContent.isEmpty()) {
m_editor->setPlainText(otp.plainTextContent());
} else {
m_editor->setHtml(htmlContent);
Q_EMIT enableHtml();
collectImages(m_msg.data());
} else {
m_editor->setPlainText(otp.plainTextContent());
}
if (auto hdr = m_msg->headerByType("X-KMail-CursorPos")) {
......
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