Added mail settings for emoticons

This commit is contained in:
defnax 2020-05-23 00:16:49 +02:00
parent f422c7249a
commit 74646413c4
4 changed files with 29 additions and 12 deletions

View file

@ -667,10 +667,14 @@ void MessageWidget::fill(const std::string &msgId)
}
ui.subjectText->setText(QString::fromUtf8(msgInfo.title.c_str()));
unsigned int formatTextFlag = RSHTML_FORMATTEXT_EMBED_LINKS ;
// emoticons disabled because of crazy cost.
//text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromUtf8(msgInfo.msg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromUtf8(msgInfo.msg.c_str()), RSHTML_FORMATTEXT_EMBED_LINKS);
// embed smileys ?
if (Settings->valueFromGroup(QString("Messages"), QString::fromUtf8("Emoticons"), true).toBool()) {
formatTextFlag |= RSHTML_FORMATTEXT_EMBED_SMILEYS ;
}
text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromUtf8(msgInfo.msg.c_str()), formatTextFlag);
ui.msgText->resetImagesStatus(Settings->getMsgLoadEmbeddedImages() || (msgInfo.msgflags & RS_MSG_LOAD_EMBEDDED_IMAGES));
ui.msgText->setHtml(text);