From 61b68252a60e29dc68b6480d55f155e41a5ec8df Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 22 Feb 2022 16:23:51 +0000 Subject: [PATCH] Only show joined/invited in search dialog (#7875) --- src/components/views/dialogs/SpotlightDialog.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/SpotlightDialog.tsx b/src/components/views/dialogs/SpotlightDialog.tsx index 5d370ac65e..701cb3099b 100644 --- a/src/components/views/dialogs/SpotlightDialog.tsx +++ b/src/components/views/dialogs/SpotlightDialog.tsx @@ -247,7 +247,10 @@ const SpotlightDialog: React.FC = ({ initialText = "", onFinished }) => SpaceStore.instance.setActiveSpace(spaceKey); }, })), - ...cli.getVisibleRooms().map(room => { + ...cli.getVisibleRooms().filter(room => { + // TODO we may want to put invites in their own list + return room.getMyMembership() === "join" || room.getMyMembership() == "invite"; + }).map(room => { let section: Section; let query: string[];