- dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES(files));
- dispatch(resourcesDataActions.SET_FILES({ uuid, files }));
+
+ // Given the array of directories and files, create the appropriate tree nodes,
+ // sort them, and add the complete url to each.
+ const tree = createCollectionFilesTree(files);
+ const sorted = sortFilesTree(tree);
+ const mapped = mapTreeValues(services.collectionService.extendFileURL)(sorted);
+ dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES(mapped));
+ dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PANEL_LOAD_FILES));