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)}