Fixed comma appended to username completion when not at the beginning of the message (#3060)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Paweł
2021-07-24 12:01:50 +02:00
committed by GitHub
parent ae9f92ded9
commit 588ed557f0
13 changed files with 97 additions and 22 deletions
+13
View File
@@ -68,4 +68,17 @@ QColor getRandomColor(const QString &userId)
return TWITCH_USERNAME_COLORS[colorIndex];
}
QString formatUserMention(const QString &userName, bool isFirstWord,
bool mentionUsersWithComma)
{
QString result = userName;
if (isFirstWord && mentionUsersWithComma)
{
result += ",";
}
return result;
}
} // namespace chatterino