aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-06-23 15:57:50 +0200
committerfiaxh <git@lightrise.org>2020-06-23 16:00:39 +0200
commitc6173db98305ad8292e3fb17d4261f44cbba4040 (patch)
tree7ed31f11293e1547e3bdebb58735565ecff0f9c8 /main/src
parent0b1fb30a83880f60ba730a1af7dab718b95ffe54 (diff)
downloaddino-c6173db98305ad8292e3fb17d4261f44cbba4040.tar.gz
dino-c6173db98305ad8292e3fb17d4261f44cbba4040.zip
Focus textinput after closing file send dialog
fixes #867
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/chat_input/view.vala6
-rw-r--r--main/src/ui/conversation_view.vala1
2 files changed, 6 insertions, 1 deletions
diff --git a/main/src/ui/chat_input/view.vala b/main/src/ui/chat_input/view.vala
index b99cd1c4..fe0767cb 100644
--- a/main/src/ui/chat_input/view.vala
+++ b/main/src/ui/chat_input/view.vala
@@ -74,7 +74,7 @@ public class View : Box {
chat_text_view.text_view.buffer.text = entry_cache[conversation];
}
- chat_text_view.text_view.grab_focus();
+ do_focus();
}
public void set_input_state(Plugins.InputFieldStatus.MessageType message_type) {
@@ -105,6 +105,10 @@ public class View : Box {
return false;
});
}
+
+ public void do_focus() {
+ chat_text_view.text_view.grab_focus();
+ }
}
}
diff --git a/main/src/ui/conversation_view.vala b/main/src/ui/conversation_view.vala
index 5d27e138..92c4fbb3 100644
--- a/main/src/ui/conversation_view.vala
+++ b/main/src/ui/conversation_view.vala
@@ -31,6 +31,7 @@ public class ConversationView : Gtk.Overlay {
widget.destroy.connect(() => {
revealer.destroy();
white_revealer.reveal_child = false;
+ chat_input.do_focus();
});
}