Use double spaces instead of Chatterino character when possible (#3081)
This commit is contained in:
@@ -375,7 +375,17 @@ void TwitchChannel::sendMessage(const QString &message)
|
||||
{
|
||||
if (parsedMessage == this->lastSentMessage_)
|
||||
{
|
||||
parsedMessage.append(MAGIC_MESSAGE_SUFFIX);
|
||||
auto spaceIndex = parsedMessage.indexOf(' ');
|
||||
if (spaceIndex == -1)
|
||||
{
|
||||
// no spaces found, fall back to old magic character
|
||||
parsedMessage.append(MAGIC_MESSAGE_SUFFIX);
|
||||
}
|
||||
else
|
||||
{
|
||||
// replace the space we found in spaceIndex with two spaces
|
||||
parsedMessage.replace(spaceIndex, 1, " ");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user