From 29b1bc84c7b2892b1840fab02406e0b8315b81e5 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Sun, 18 Oct 2020 16:31:21 +0200 Subject: [PATCH] Clear text box after sending. --- source/Channel.d | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/Channel.d b/source/Channel.d index 673a203..1806744 100644 --- a/source/Channel.d +++ b/source/Channel.d @@ -108,7 +108,16 @@ public final class Channel private void sendMessageBtn(Button) { - client.sendMessage(0, channelName, textInput.getBuffer().getText()); + /* Retrieve the message */ + string message = textInput.getBuffer().getText(); + + /* TODO: Add the message to our log (as it won't be delivered to us) */ + + /* Send the message */ + client.sendMessage(0, channelName, message); + + /* Clear the text box */ + textInput.getBuffer().setText(""); } public Box getBox()