chore: if space is selected, only show chats within that space in activity chat selelction dialog

This commit is contained in:
ggurdin 2025-06-18 10:27:45 -04:00
parent 4cd3587ba4
commit 27b70f9a76
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -69,6 +69,13 @@ class ActivityRoomSelectionState extends State<ActivityRoomSelection> {
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) {