From a34e9637feaf8d58086c5426cfa377b2714e2ce4 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 24 Dec 2018 12:52:58 -0600 Subject: [PATCH] Chats will not be able to sent twice when pressing enter repeatedly --- src/controller/buffers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controller/buffers.py b/src/controller/buffers.py index c0a89df..166bcd0 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -785,6 +785,7 @@ class chatBuffer(baseBuffer): if text == "" and not hasattr(self, "attachments_to_be_sent"): wx.Bell() return + self.tab.text.SetValue("") call_threaded(self._send_message, text=text) def upload_attachments(self, attachments): @@ -833,8 +834,6 @@ class chatBuffer(baseBuffer): except ValueError as ex: if ex.code == 9: output.speak(_(u"You have been sending a message that is already sent. Try to update the buffer if you can't see the new message in the history.")) - finally: - self.tab.text.SetValue("") def __init__(self, *args, **kwargs): super(chatBuffer, self).__init__(*args, **kwargs)