aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2023-01-07 23:32:10 +0100
committerfiaxh <git@lightrise.org>2023-01-07 23:35:39 +0100
commit60371331e0882758b0b9c2efedb3821e716defd7 (patch)
tree6c5a60cc149cb83332eb7c45d9a4cf4862f6b7be /main
parentdc52e7595cca06d0a2da7d11b3c88cb2f7ce529c (diff)
downloaddino-60371331e0882758b0b9c2efedb3821e716defd7.tar.gz
dino-60371331e0882758b0b9c2efedb3821e716defd7.zip
Replies: Fix quoted message not being reset after sending
fixes #1334
Diffstat (limited to 'main')
-rw-r--r--main/src/ui/chat_input/chat_input_controller.vala8
1 files changed, 5 insertions, 3 deletions
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() {