diff --git a/src/result/result-store.js b/src/result/result-store.js index 519c94a..5d93d38 100644 --- a/src/result/result-store.js +++ b/src/result/result-store.js @@ -17,6 +17,7 @@ import ArrayStore from '../common/array-store'; import ResultsDataManager from './results-data-manager'; +import AppDispatcher from '../common/app-dispatcher'; class ResultStore extends ArrayStore { constructor() { @@ -56,6 +57,16 @@ class ResultStore extends ArrayStore { this.simplifyTimestamps([action.data]); return super.reduce(state, action); + case 'results/removed': + // Remove files from filestore + action.data.resultFileIDs.forEach(fileid => { + AppDispatcher.dispatch({ + type: 'files/removed', + data: fileid + }); + }); + return super.reduce(state, action); + case 'resultfiles/start-upload': ResultsDataManager.uploadFile(action.data, action.resultID, action.token, action.progressCallback, action.finishedCallback, action.scenarioID); return state;