From 8e35267982b0ca0358c28d5bfe3f45bdbc1db83b Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Thu, 30 Jun 2022 13:32:00 +0200 Subject: [PATCH] Load indicators in share jail when resharing is enabled --- .../src/services/folder/spaces/loaderShare.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/web-app-files/src/services/folder/spaces/loaderShare.ts b/packages/web-app-files/src/services/folder/spaces/loaderShare.ts index 5acf92a6a6b..829a27f749f 100644 --- a/packages/web-app-files/src/services/folder/spaces/loaderShare.ts +++ b/packages/web-app-files/src/services/folder/spaces/loaderShare.ts @@ -5,6 +5,7 @@ import { isLocationSpacesActive } from '../../../router' import { buildResource, buildWebDavSpacesPath } from '../../../helpers/resources' import { Store } from 'vuex' import get from 'lodash-es/get' +import { useCapabilityFilesSharingResharing } from 'web-pkg/src/composables' export const SHARE_JAIL_ID = 'a0ca6a90-a365-4782-871e-d44447bbc668' @@ -32,10 +33,21 @@ export class FolderLoaderSpacesShare implements FolderLoader { const resources = webDavResponse.map(buildResource) const currentFolder = resources.shift() + const hasResharing = useCapabilityFilesSharingResharing(store) + let loadIndicators = false + + if (hasResharing.value) { + loadIndicators = true + yield store.dispatch('Files/loadSharesTree', { + client: clientService.owncloudSdk, + path: currentFolder.path + }) + } store.commit('Files/LOAD_FILES', { currentFolder, - files: resources + files: resources, + loadIndicators }) }) }