From 0f28fa402354aa4f5526dbd238da1ec567582466 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Mon, 26 Oct 2026 16:19:35 -0400 Subject: [PATCH] fix: the search window only offers locations that fit the chosen content type (#33183) --- src/lib/components/layout/SearchModal.svelte | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lib/components/layout/SearchModal.svelte b/src/lib/components/layout/SearchModal.svelte index 27a6d012f8..a8728fe741 100644 --- a/src/lib/components/layout/SearchModal.svelte +++ b/src/lib/components/layout/SearchModal.svelte @@ -59,6 +59,10 @@ let suggestionIndex = -1; const icons = { chat: ChatBubble, message: Hashtag, note: Document }; const labels = { chat: 'Chats', message: 'Messages', note: 'Notes' }; + const locations = [ + { kind: 'folder', label: 'Folders', type: 'chat' }, + { kind: 'channel', label: 'Channels', type: 'message' } + ]; const filterDescriptions: Record = { tag: 'search for tags', folder: 'search for folders', @@ -418,6 +422,12 @@ >{#each kinds as type} - {#each [{ kind: 'folder', label: 'Folders' }, { kind: 'channel', label: 'Channels' }] as group} - {#if scopes.some((item) => item.kind === group.kind)} + {#each locations as group} + {#if (kind === 'all' || kind === group.type) && scopes.some((item) => item.kind === group.kind)}