From e868a45a2a187dca9812c5e6e201503f3e427e08 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Tue, 8 Mar 2022 13:21:43 -0300 Subject: [PATCH] 18787: Removes unnecessary store init to avoid forced refreshes. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- src/store/collections/collection-upload-actions.ts | 5 +---- src/store/workbench/workbench-actions.ts | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/store/collections/collection-upload-actions.ts b/src/store/collections/collection-upload-actions.ts index 9e9fea52..e9c5cc35 100644 --- a/src/store/collections/collection-upload-actions.ts +++ b/src/store/collections/collection-upload-actions.ts @@ -10,8 +10,6 @@ import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions'; import { fileUploaderActions } from 'store/file-uploader/file-uploader-actions'; import { reset, startSubmit, stopSubmit } from 'redux-form'; import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions"; -import { collectionPanelFilesAction } from 'store/collection-panel/collection-panel-files/collection-panel-files-actions'; -import { createTree } from 'models/tree'; import * as WorkbenchActions from 'store/workbench/workbench-actions'; export const uploadCollectionFiles = (collectionUuid: string, targetLocation?: string) => @@ -38,8 +36,7 @@ export const submitCollectionFiles = (targetLocation?: string) => try { dispatch(progressIndicatorActions.START_WORKING(COLLECTION_UPLOAD_FILES_DIALOG)); dispatch(startSubmit(COLLECTION_UPLOAD_FILES_DIALOG)); - await dispatch(uploadCollectionFiles(currentCollection.uuid, targetLocation)) - .then(() => dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES({ files: createTree() }))); + await dispatch(uploadCollectionFiles(currentCollection.uuid, targetLocation)); dispatch(closeUploadCollectionFilesDialog()); dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Data has been uploaded.', diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index d2ff84b3..3142b633 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -100,8 +100,6 @@ import { subprocessPanelActions } from 'store/subprocess-panel/subprocess-panel- import { subprocessPanelColumns } from 'views/subprocess-panel/subprocess-panel-root'; import { loadAllProcessesPanel, allProcessesPanelActions } from '../all-processes-panel/all-processes-panel-action'; import { allProcessesPanelColumns } from 'views/all-processes-panel/all-processes-panel'; -import { collectionPanelFilesAction } from '../collection-panel/collection-panel-files/collection-panel-files-actions'; -import { createTree } from 'models/tree'; import { AdminMenuIcon } from 'components/icon/icon'; import { userProfileGroupsColumns } from 'views/user-profile-panel/user-profile-panel-root'; @@ -295,8 +293,6 @@ export const loadCollection = (uuid: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { const userUuid = getUserUuid(getState()); if (userUuid) { - // Clear collection files panel - dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES({ files: createTree() })); const match = await loadGroupContentsResource({ uuid, userUuid, services }); match({ OWNED: async collection => { -- 2.30.2