diff options
author | selurvedu <11262062+selurvedu@users.noreply.github.com> | 2020-04-24 15:35:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 14:35:47 +0200 |
commit | 231df1bbbb683fa0c74f2f10743f7592e219eccd (patch) | |
tree | 6450def2748ab08d93ebda4768248f7be34db076 /main/src/ui | |
parent | f8f305efe551838c780dce4224c06bed695d8a62 (diff) | |
download | dino-231df1bbbb683fa0c74f2f10743f7592e219eccd.tar.gz dino-231df1bbbb683fa0c74f2f10743f7592e219eccd.zip |
Prevent dino from sending whitespace only messages (#821)
Fixes #774.
Co-authored-by: selurvedu <selurvedu@users.noreply.github.com>
Diffstat (limited to 'main/src/ui')
-rw-r--r-- | main/src/ui/chat_input/chat_text_view.vala | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } |