Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2023-05-31 00:26:44 +0300
committerwurstsalat <mailtrash@posteo.de>2023-05-31 00:26:53 +0300
commit915a9f0fbe638c994de29318bdc26f86588b18ec (patch)
treee1564497b2c7253a588c1cf4d84a98768879b640
parent238ac3299a0c0b9b022df34ff0737ada8c1d7990 (diff)
fix: Fix interaction of GroupchatRoster and SearchView
Fixes #11546
-rw-r--r--gajim/gtk/chat_page.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/gajim/gtk/chat_page.py b/gajim/gtk/chat_page.py
index 30c28e9d0..30a2491de 100644
--- a/gajim/gtk/chat_page.py
+++ b/gajim/gtk/chat_page.py
@@ -153,7 +153,16 @@ class ChatPage(Gtk.Box):
self._chat_stack.show_chat(account, jid)
- if self._search_revealer.get_reveal_child():
+ if (not self._search_revealer.get_reveal_child() and
+ self._restore_occupants_list and
+ self._chat_control.contact.is_groupchat):
+ # GroupchatRoster was hidden by Search initially, but Search was
+ # afterwards closed in a 1:1 chat. Only restore GroupchatRoster if
+ # a group chat was selected.
+ app.settings.set('hide_groupchat_occupants_list', False)
+ self._restore_occupants_list = False
+
+ if not app.settings.get('hide_groupchat_occupants_list'):
self._search_view.set_context(account, jid)
self.emit('chat-selected', workspace_id, account, jid)
@@ -342,7 +351,11 @@ class ChatPage(Gtk.Box):
if self._search_revealer.get_reveal_child():
self._search_revealer.set_reveal_child(False)
- if self._restore_occupants_list:
+ if (self._restore_occupants_list and
+ self._chat_control.contact.is_groupchat):
+ # Restore GroupchatRoster only if a group chat is selected
+ # currently. If this condition isn' satisfied, it is checked
+ # again as soon as a chat is selected in _on_chat_selected.
app.settings.set('hide_groupchat_occupants_list', False)
self._restore_occupants_list = False