From 8b5ebcf85b0dd7c4addc02028ae53b1f4fee9391 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 17 Dec 2023 01:30:33 +0100 Subject: Matrix: reset edit text if edit text empty --- src/QuickMedia.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index c348e1c..f7dab9f 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -7329,7 +7329,7 @@ namespace QuickMedia { chat_state = ChatState::EDITING; currently_operating_on_item = selected; chat_input.set_editable(true); - if(room_extra_data.editing_message_id.empty() || message->event_id != room_extra_data.editing_message_id) { + if(chat_input.get_text().empty() || room_extra_data.editing_message_id.empty() || message->event_id != room_extra_data.editing_message_id) { chat_input.set_text(std::move(body_text_unformatted)); // TODO: Description? it may change in the future, in which case this should be edited } chat_input.move_caret_to_end(); -- cgit v1.2.3