chore: don't filter left rooms out of discover results in space view (#3530)

This commit is contained in:
ggurdin 2025-07-22 15:07:14 -04:00 committed by GitHub
parent 4105459b73
commit b2625138f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -492,8 +492,13 @@ class _SpaceViewState extends State<SpaceView> {
) {
final List<SpaceRoomsChunk> 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;
}