From 871ff33ac79f3d17b0260b8bfcd27780038edd6d Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 3 Apr 2020 22:49:59 +0200 Subject: Add support for last message correction --- main/src/ui/conversation_view_controller.vala | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'main/src/ui/conversation_view_controller.vala') diff --git a/main/src/ui/conversation_view_controller.vala b/main/src/ui/conversation_view_controller.vala index abb8ab57..2e03de8f 100644 --- a/main/src/ui/conversation_view_controller.vala +++ b/main/src/ui/conversation_view_controller.vala @@ -40,7 +40,6 @@ public class ConversationViewController : Object { view.conversation_frame.init(stream_interactor); // drag 'n drop file upload - Gtk.drag_dest_unset(view.chat_input.text_input); Gtk.drag_dest_set(view, DestDefaults.ALL, target_list, Gdk.DragAction.COPY); view.drag_data_received.connect(this.on_drag_data_received); @@ -52,7 +51,9 @@ public class ConversationViewController : Object { // goto-end floating button var vadjustment = view.conversation_frame.scrolled.vadjustment; vadjustment.notify["value"].connect(() => { - view.goto_end_revealer.reveal_child = vadjustment.value < vadjustment.upper - vadjustment.page_size; + bool button_active = vadjustment.value < vadjustment.upper - vadjustment.page_size; + view.goto_end_revealer.reveal_child = button_active; + view.goto_end_revealer.visible = button_active; }); view.goto_end_button.clicked.connect(() => { view.conversation_frame.initialize_for_conversation(conversation); @@ -158,9 +159,11 @@ public class ConversationViewController : Object { if ((event.state & ModifierType.CONTROL_MASK) > 0) { return false; } - view.chat_input.text_input.key_press_event(event); - view.chat_input.text_input.grab_focus(); - return true; + if (view.chat_input.chat_text_view.text_view.key_press_event(event)) { + view.chat_input.chat_text_view.text_view.grab_focus(); + return true; + } + return false; } } } -- cgit v1.2.3-54-g00ecf