Clarify how markdown is determined

This commit is contained in:
Loren Burkholder 2021-01-20 18:47:36 -05:00
parent 1d93570814
commit 06f6a5bcca
2 changed files with 3 additions and 3 deletions

View file

@ -257,7 +257,7 @@ InputBar::message(QString msg, MarkdownOverride useMarkdown)
text.body = msg.trimmed().toStdString(); text.body = msg.trimmed().toStdString();
if ((ChatPage::instance()->userSettings()->markdown() && if ((ChatPage::instance()->userSettings()->markdown() &&
(useMarkdown != MarkdownOverride::OFF)) || (useMarkdown == MarkdownOverride::NOT_SPECIFIED)) ||
(useMarkdown == MarkdownOverride::ON)) { (useMarkdown == MarkdownOverride::ON)) {
text.formatted_body = utils::markdownToHtml(msg).toStdString(); text.formatted_body = utils::markdownToHtml(msg).toStdString();

View file

@ -14,7 +14,7 @@ class QStringList;
enum class MarkdownOverride enum class MarkdownOverride
{ {
NONE, // no override set NOT_SPECIFIED, // no override set
ON, ON,
OFF, OFF,
}; };
@ -48,7 +48,7 @@ public slots:
void updateState(int selectionStart, int selectionEnd, int cursorPosition, QString text); void updateState(int selectionStart, int selectionEnd, int cursorPosition, QString text);
void openFileSelection(); void openFileSelection();
bool uploading() const { return uploading_; } bool uploading() const { return uploading_; }
void message(QString body, MarkdownOverride useMarkdown = MarkdownOverride::NONE); void message(QString body, MarkdownOverride useMarkdown = MarkdownOverride::NOT_SPECIFIED);
QObject *completerFor(QString completerName); QObject *completerFor(QString completerName);