From b2625138f05ff370f02126048dc39e370919de49 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:07:14 -0400 Subject: [PATCH] chore: don't filter left rooms out of discover results in space view (#3530) --- lib/pages/chat_list/space_view.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/pages/chat_list/space_view.dart b/lib/pages/chat_list/space_view.dart index 9de3a0f35..929431f1b 100644 --- a/lib/pages/chat_list/space_view.dart +++ b/lib/pages/chat_list/space_view.dart @@ -492,8 +492,13 @@ class _SpaceViewState extends State { ) { final List filteredChildren = []; for (final child in hierarchyResponse) { - if (child.roomId == widget.spaceId || - Matrix.of(context).client.getRoomById(child.roomId) != null) { + if (child.roomId == widget.spaceId) { + continue; + } + + final room = Matrix.of(context).client.getRoomById(child.roomId); + if (room != null && room.membership != Membership.leave) { + // If the room is already joined or invited, skip it continue; }