Philipp Hörist pushed to branch master at gajim / gajim


Commits:
50890efb by Philipp Hörist at 2025-10-16T23:01:23+02:00
fix: ChatList: Filter contact groups correctly

Group Chats should not show if a contact group filter is set

- - - - -


1 changed file:

- gajim/gtk/chat_list.py


Changes:

=====================================
gajim/gtk/chat_list.py
=====================================
@@ -431,14 +431,6 @@ def _filter_func(self, row: ChatListRow) -> bool:
         if account is not None and account != row.account:
             return False
 
-        group = self._current_filter.group
-        if (
-            group is not None
-            and isinstance(row.contact, BareContact)
-            and group not in row.contact.groups
-        ):
-            return False
-
         is_groupchat = row.type == "groupchat"
         if self._current_filter.type == ChatTypeFilter.CHAT and is_groupchat:
             return False
@@ -446,6 +438,15 @@ def _filter_func(self, row: ChatListRow) -> bool:
         if self._current_filter.type == ChatTypeFilter.GROUPCHAT and not 
is_groupchat:
             return False
 
+        group = self._current_filter.group
+        if group is not None:
+            if is_groupchat:
+                return False
+
+            assert isinstance(row.contact, BareContact)
+            if group not in row.contact.groups:
+                return False
+
         if not self._current_filter_text:
             return True
         text = self._current_filter_text.lower()



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

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


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to