Skip to content

Commit

Permalink
Load indicators in share jail when resharing is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Jun 30, 2022
1 parent 06f5b47 commit 8e35267
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/web-app-files/src/services/folder/spaces/loaderShare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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
})
})
}
Expand Down

0 comments on commit 8e35267

Please sign in to comment.