diff options
author | wurstsalat <mailtrash@posteo.de> | 2023-05-28 23:39:04 +0300 |
---|---|---|
committer | wurstsalat <mailtrash@posteo.de> | 2023-05-28 23:39:27 +0300 |
commit | 9b44d7693f3b478b6ed5bffd680f588f71aea59f (patch) | |
tree | b2f4eb28b3e3126f1205282705c822e92f39a9eb | |
parent | af4223a99c11ac696f2bcd96b9567b6b92cf2c62 (diff) |
cfix: Search: Restore group chat participants list to previous state when closing search via Escape
Fixes #11536
-rw-r--r-- | gajim/gtk/chat_page.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gajim/gtk/chat_page.py b/gajim/gtk/chat_page.py index 49c193a9d..30c28e9d0 100644 --- a/gajim/gtk/chat_page.py +++ b/gajim/gtk/chat_page.py @@ -171,7 +171,8 @@ class ChatPage(Gtk.Box): self._chat_control.contact.jid) if not app.settings.get('hide_groupchat_occupants_list'): - # Hide group chat roster in order to make some space horizontally + # Hide group chat roster in order to make some space horizontally. + # Store state to be able to restore it when hiding search. self._restore_occupants_list = True app.settings.set('hide_groupchat_occupants_list', True) @@ -179,11 +180,7 @@ class ChatPage(Gtk.Box): self._search_view.set_focus() def _on_search_hide(self, *args: Any) -> None: - if self._restore_occupants_list: - app.settings.set('hide_groupchat_occupants_list', False) - self._restore_occupants_list = False - - self._search_revealer.set_reveal_child(False) + self.hide_search() def _on_chat_list_changed(self, chat_list_stack: ChatListStack, @@ -344,6 +341,11 @@ class ChatPage(Gtk.Box): def hide_search(self) -> bool: if self._search_revealer.get_reveal_child(): self._search_revealer.set_reveal_child(False) + + if self._restore_occupants_list: + app.settings.set('hide_groupchat_occupants_list', False) + self._restore_occupants_list = False + return True return False |