From 231df1bbbb683fa0c74f2f10743f7592e219eccd Mon Sep 17 00:00:00 2001 From: selurvedu <11262062+selurvedu@users.noreply.github.com> Date: Fri, 24 Apr 2020 15:35:47 +0300 Subject: [PATCH] Prevent dino from sending whitespace only messages (#821) Fixes #774. Co-authored-by: selurvedu --- main/src/ui/chat_input/chat_text_view.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/ui/chat_input/chat_text_view.vala b/main/src/ui/chat_input/chat_text_view.vala index 1155d21d..8d5cb7a1 100644 --- a/main/src/ui/chat_input/chat_text_view.vala +++ b/main/src/ui/chat_input/chat_text_view.vala @@ -75,7 +75,7 @@ public class ChatTextView : ScrolledWindow { if (event.keyval in new uint[]{Key.Return, Key.KP_Enter}) { if ((event.state & ModifierType.SHIFT_MASK) > 0) { text_view.buffer.insert_at_cursor("\n", 1); - } else if (text_view.buffer.text != "") { + } else if (text_view.buffer.text.strip() != "") { send_text(); edit_history.reset_history(); }