From c503f21470a6dbafb55df312e36701a51994194a Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Wed, 21 Oct 2026 09:38:15 +0200 Subject: [PATCH] fix: Manage Files count shows all files while searching (#32816) The number next to the Files title in Manage Files stayed at the account's total while a search narrowed the list. While searching it now shows how many files are listed for the search, as before the redesign, and the total comes back once the search is cleared. Fixes #32815 --- src/lib/components/layout/FilesModal.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/components/layout/FilesModal.svelte b/src/lib/components/layout/FilesModal.svelte index f76d21ff52..4e84e1aa8f 100644 --- a/src/lib/components/layout/FilesModal.svelte +++ b/src/lib/components/layout/FilesModal.svelte @@ -55,6 +55,7 @@ $: busy = selectionStatus === 'loading' || !!operation || showDeleteConfirmDialog; $: loadedSelected = (files ?? []).filter((file) => selectedIds.has(file.id)).length; $: allLoadedSelected = !!files?.length && loadedSelected === files.length; + $: shownFileCount = query ? (files?.length ?? null) : fileCount; $: sortedFiles = [...(files ?? [])].sort((a, b) => { const result = orderBy === 'filename' @@ -80,7 +81,7 @@ files = more ? [...(files ?? []), ...result] : result; page = nextPage; allFilesLoaded = result.length < PAGE_SIZE; - if (!more) { + if (!more && !query) { const count = await getUserFileCount(localStorage.token); if (request === generation) fileCount = count; } @@ -252,8 +253,8 @@
{$i18n.t('Files')} - {#if fileCount !== null}{fileCount}{shownFileCount}{/if}