From 27b70f9a769671bc2a7190206512bfee6dd0cdf6 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Wed, 18 Jun 2025 10:27:45 -0400 Subject: [PATCH] chore: if space is selected, only show chats within that space in activity chat selelction dialog --- .../activity_suggestions/activity_room_selection.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/pangea/activity_suggestions/activity_room_selection.dart b/lib/pangea/activity_suggestions/activity_room_selection.dart index 4ca587ce5..d0d91a78c 100644 --- a/lib/pangea/activity_suggestions/activity_room_selection.dart +++ b/lib/pangea/activity_suggestions/activity_room_selection.dart @@ -69,6 +69,13 @@ class ActivityRoomSelectionState extends State { return a.name.toLowerCase().compareTo(b.name.toLowerCase()); }); + final room = widget.controller.room; + if (room != null && room.isSpace) { + _launchableRooms = _launchableRooms.where((r) { + return room.spaceChildren.any((child) => child.roomId == r.id); + }).toList(); + } + _hasBotDM = Matrix.of(context).client.rooms.any((room) { if (room.isDirectChat && room.directChatMatrixID == BotName.byEnvironment) {