aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_view_controller.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-04-03 22:49:59 +0200
committerfiaxh <git@lightrise.org>2020-04-03 22:49:59 +0200
commit871ff33ac79f3d17b0260b8bfcd27780038edd6d (patch)
treef8079e29db5d0f9294fbfbfb47b93b0403249cc9 /main/src/ui/conversation_view_controller.vala
parent1c8e15c408f57d93461e6adb33c4c4415ac49267 (diff)
downloaddino-871ff33ac79f3d17b0260b8bfcd27780038edd6d.tar.gz
dino-871ff33ac79f3d17b0260b8bfcd27780038edd6d.zip
Add support for last message correction
Diffstat (limited to 'main/src/ui/conversation_view_controller.vala')
-rw-r--r--main/src/ui/conversation_view_controller.vala13
1 files changed, 8 insertions, 5 deletions
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;
}
}
}