mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Disabled CTRL+Enter adding messages more than once.
This commit is contained in:
parent
33a58903f0
commit
663dfe5e9e
1 changed files with 2 additions and 3 deletions
|
@ -57,7 +57,6 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget)
|
||||||
if (c == nullptr) {
|
if (c == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
c->sendMessage(textInput.toPlainText());
|
c->sendMessage(textInput.toPlainText());
|
||||||
prevMsg.append(textInput.toPlainText());
|
prevMsg.append(textInput.toPlainText());
|
||||||
event->accept();
|
event->accept();
|
||||||
|
@ -66,9 +65,9 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget)
|
||||||
textInput.setText(QString());
|
textInput.setText(QString());
|
||||||
prevIndex = 0;
|
prevIndex = 0;
|
||||||
}
|
}
|
||||||
else if(textInput.toPlainText() == prevMsg.at(1))
|
else if(textInput.toPlainText() == prevMsg.at(prevMsg.size()-1))
|
||||||
{
|
{
|
||||||
prevMsg.removeFirst();
|
prevMsg.removeLast();
|
||||||
}
|
}
|
||||||
prevIndex = prevMsg.size();
|
prevIndex = prevMsg.size();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue