mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Don't add empty messages to message history. (#674)
This commit is contained in:
parent
a07255be2d
commit
be4b3f1a38
1 changed files with 3 additions and 2 deletions
|
@ -176,8 +176,9 @@ void SplitInput::installKeyPressedEvent()
|
|||
sendMessage = sendMessage.replace('\n', ' ');
|
||||
|
||||
c->sendMessage(sendMessage);
|
||||
// don't add duplicate messages to message history
|
||||
if (this->prevMsg_.isEmpty() || !this->prevMsg_.endsWith(message))
|
||||
// don't add duplicate messages and empty message to message history
|
||||
if ((this->prevMsg_.isEmpty() || !this->prevMsg_.endsWith(message)) &&
|
||||
!message.trimmed().isEmpty())
|
||||
this->prevMsg_.append(message);
|
||||
|
||||
event->accept();
|
||||
|
|
Loading…
Reference in a new issue