From 01cba5dc12f4627d2e7aa872cfddd5322b570e49 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Tue, 11 Aug 2026 19:04:11 +0200 Subject: [PATCH] fix(files): update loading behavior when changing location Signed-off-by: Luka Trovic --- apps/files/src/components/FilesListVirtual.vue | 6 ++++++ apps/files/src/components/VirtualList.vue | 8 +++++++- apps/files/src/views/FilesList.vue | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index 19759f38694a2..84f771505b3e9 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -8,6 +8,7 @@ :data-component="userConfig.grid_view ? FileEntryGrid : FileEntry" data-key="source" :data-sources="nodes" + :loading="loading" :grid-mode="userConfig.grid_view" :extra-props="{ isMimeAvailable, @@ -129,6 +130,11 @@ export default defineComponent({ type: String, required: true, }, + + loading: { + type: Boolean, + default: false, + }, }, setup(props) { diff --git a/apps/files/src/components/VirtualList.vue b/apps/files/src/components/VirtualList.vue index 2af11785b027d..30d21afb17ae9 100644 --- a/apps/files/src/components/VirtualList.vue +++ b/apps/files/src/components/VirtualList.vue @@ -22,12 +22,13 @@
| null, @@ -410,6 +412,7 @@ export default defineComponent({ return this.currentFolder !== undefined && !this.isEmptyDir && this.loading + && !this.changingLocation }, /** @@ -476,12 +479,14 @@ export default defineComponent({ } logger.debug('View changed', { newView, oldView }) + this.changingLocation = true this.selectionStore.reset() this.fetchContent() }, directory(newDir, oldDir) { logger.debug('Directory changed', { newDir, oldDir }) + this.changingLocation = true // TODO: preserve selection on browsing? this.selectionStore.reset() this.sidebar.close() @@ -608,6 +613,7 @@ export default defineComponent({ this.error = humanizeWebDAVError(error) } finally { this.loading = false + this.changingLocation = false } },