Don't send empty messages

This commit is contained in:
Konstantinos Sideris 2017-11-16 14:42:13 +02:00
parent 4166a863b4
commit 21fdb26bd4

View file

@ -133,6 +133,9 @@ FilteredTextEdit::minimumSizeHint() const
void void
FilteredTextEdit::submit() FilteredTextEdit::submit()
{ {
if (toPlainText().trimmed().isEmpty())
return;
if (true_history_.size() == INPUT_HISTORY_SIZE) if (true_history_.size() == INPUT_HISTORY_SIZE)
true_history_.pop_back(); true_history_.pop_back();
true_history_.push_front(toPlainText()); true_history_.push_front(toPlainText());