From 06f6a5bcca60d992e48d8ea10e2e9fa52f4e086a Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Wed, 20 Jan 2021 18:47:36 -0500 Subject: [PATCH] Clarify how markdown is determined --- src/timeline/InputBar.cpp | 2 +- src/timeline/InputBar.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index 0e35cf64..2317a407 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp @@ -257,7 +257,7 @@ InputBar::message(QString msg, MarkdownOverride useMarkdown) text.body = msg.trimmed().toStdString(); if ((ChatPage::instance()->userSettings()->markdown() && - (useMarkdown != MarkdownOverride::OFF)) || + (useMarkdown == MarkdownOverride::NOT_SPECIFIED)) || (useMarkdown == MarkdownOverride::ON)) { text.formatted_body = utils::markdownToHtml(msg).toStdString(); diff --git a/src/timeline/InputBar.h b/src/timeline/InputBar.h index 57b38c08..f173bbc0 100644 --- a/src/timeline/InputBar.h +++ b/src/timeline/InputBar.h @@ -14,7 +14,7 @@ class QStringList; enum class MarkdownOverride { - NONE, // no override set + NOT_SPECIFIED, // no override set ON, OFF, }; @@ -48,7 +48,7 @@ public slots: void updateState(int selectionStart, int selectionEnd, int cursorPosition, QString text); void openFileSelection(); 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);