Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
ca7e09da by wurstsalat at 2023-05-28T16:52:35+02:00
fix: Search: Restore group chat participants list to previous state when 
closing search

Fixes #11536

- - - - -


1 changed file:

- gajim/gtk/chat_page.py


Changes:

=====================================
gajim/gtk/chat_page.py
=====================================
@@ -75,6 +75,8 @@ def __init__(self):
         self._search_revealer.add(self._search_view)
         self._ui.right_grid.attach(self._search_revealer, 1, 0, 1, 1)
 
+        self._restore_occupants_list = False
+
         self._chat_filter = ChatFilter(icons=True)
         self._ui.filter_bar.add(self._chat_filter)
         self._ui.filter_bar_toggle.connect(
@@ -168,13 +170,19 @@ def _on_search_history(self,
             self._search_view.set_context(self._chat_control.contact.account,
                                           self._chat_control.contact.jid)
 
-        # Hide group chat roster in order to make some space horizontally
-        app.settings.set('hide_groupchat_occupants_list', True)
+        if not app.settings.get('hide_groupchat_occupants_list'):
+            # Hide group chat roster in order to make some space horizontally
+            self._restore_occupants_list = True
+            app.settings.set('hide_groupchat_occupants_list', True)
 
         self._search_revealer.set_reveal_child(True)
         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)
 
     def _on_chat_list_changed(self,



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/ca7e09da50176c45d9d49ae434ad7de2531ebec1

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/ca7e09da50176c45d9d49ae434ad7de2531ebec1
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to