From 60371331e0882758b0b9c2efedb3821e716defd7 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 7 Jan 2023 23:32:10 +0100 Subject: Replies: Fix quoted message not being reset after sending fixes #1334 --- main/src/ui/chat_input/chat_input_controller.vala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'main/src/ui/chat_input') diff --git a/main/src/ui/chat_input/chat_input_controller.vala b/main/src/ui/chat_input/chat_input_controller.vala index de75cdf8..c5693300 100644 --- a/main/src/ui/chat_input/chat_input_controller.vala +++ b/main/src/ui/chat_input/chat_input_controller.vala @@ -136,9 +136,6 @@ public class ChatInputController : Object { string text = chat_input.chat_text_view.text_view.buffer.text; - chat_input.chat_text_view.text_view.buffer.text = ""; - chat_input.unset_quoted_message(); - if (text.has_prefix("/")) { string[] token = text.split(" ", 2); switch(token[0]) { @@ -196,6 +193,11 @@ public class ChatInputController : Object { stream_interactor.get_module(Replies.IDENTITY).set_message_is_reply_to(out_message, quoted_content_item); } stream_interactor.get_module(MessageProcessor.IDENTITY).send_message(out_message, conversation); + + // Reset input state + chat_input.chat_text_view.text_view.buffer.text = ""; + chat_input.unset_quoted_message(); + quoted_content_item = null; } private void on_text_input_changed() { -- cgit v1.2.3-54-g00ecf