client: Ensure search UI is actually shown when activating shortcut

This commit is contained in:
Michael Gratton 2021-04-14 09:16:49 +10:00 committed by Michael James Gratton
parent 45bab34f45
commit 2222c6af87

View file

@ -957,6 +957,13 @@ public class Application.MainWindow :
/** Displays and focuses the search bar for the window. */
public void show_search_bar(string? text = null) {
if (!this.is_conversation_list_shown) {
if (this.outer_leaflet.folded) {
this.outer_leaflet.set_visible_child_name(INNER_LEAFLET);
}
this.inner_leaflet.set_visible_child_name(CONVERSATION_LIST);
}
this.search_bar.grab_focus();
if (text != null) {
this.search_bar.entry.text = text;