mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(chatmessage): Delete duplicate enum MarkdownType
This commit is contained in:
parent
ad2726802f
commit
446626dabe
|
@ -57,7 +57,7 @@ ChatMessage::Ptr ChatMessage::createChatMessage(const QString &sender, const QSt
|
|||
text = detectQuotes(detectAnchors(text), type);
|
||||
|
||||
//markdown
|
||||
if (Settings::getInstance().getMarkdownPreference() != MarkdownType::NONE)
|
||||
if (Settings::getInstance().getMarkdownPreference() != NONE)
|
||||
text = detectMarkdown(text);
|
||||
|
||||
switch(type)
|
||||
|
@ -209,7 +209,7 @@ QString ChatMessage::detectMarkdown(const QString &str)
|
|||
{
|
||||
int mul = 0; // Determines how many characters to strip from markdown text
|
||||
// Set mul depending on markdownPreference
|
||||
if (Settings::getInstance().getMarkdownPreference() == MarkdownType::WITHOUT_CHARS)
|
||||
if (Settings::getInstance().getMarkdownPreference() == WITHOUT_CHARS)
|
||||
mul = 2;
|
||||
|
||||
// Match captured string to corresponding md format
|
||||
|
|
|
@ -45,13 +45,6 @@ public:
|
|||
ALERT,
|
||||
};
|
||||
|
||||
enum MarkdownType
|
||||
{
|
||||
NONE,
|
||||
WITH_CHARS,
|
||||
WITHOUT_CHARS,
|
||||
};
|
||||
|
||||
ChatMessage();
|
||||
|
||||
static ChatMessage::Ptr createChatMessage(const QString& sender, const QString& rawMessage, MessageType type, bool isMe, const QDateTime& date = QDateTime());
|
||||
|
|
Loading…
Reference in New Issue
Block a user