Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Refresh current dir after closing upload dialog in object store mode (#1322)

Stanimir7e1f97ee1569
diff --git a/app/reducers/app.ts b/app/reducers/app.ts
index 8982d5fb8..6cd31d771 100644
--- a/app/reducers/app.ts
+++ b/app/reducers/app.ts
@@ -374,15 +374,15 @@ export default (state: any = initialState, action: any) => {
return state;
}
case types.CLEAR_UPLOAD_DIALOG: {
- if (PlatformIO.haveObjectStoreSupport()) {
- // upload dialog have objectStore support only
- return {
- ...state,
- progress: [],
- uploadDialogOpened: false
- };
- }
- return state;
+ // if (PlatformIO.haveObjectStoreSupport()) {
+ // upload dialog have objectStore support only
+ return {
+ ...state,
+ progress: [],
+ uploadDialogOpened: false
+ };
+ // }
+ // return state;
}
case types.TOGGLE_PROGRESS_DIALOG: {
return {
@@ -848,7 +848,17 @@ export const actions = {
toggleUploadDialog: () => ({
type: types.TOGGLE_UPLOAD_DIALOG
}),
- clearUploadDialog: () => ({
+ clearUploadDialog: () => (
+ dispatch: (actions: Object) => void,
+ getState: () => any
+ ) => {
+ if (PlatformIO.haveObjectStoreSupport()) {
+ const { currentDirectoryPath } = getState().app;
+ dispatch(actions.clearUploadDialogInt());
+ dispatch(actions.loadDirectoryContent(currentDirectoryPath));
+ }
+ },
+ clearUploadDialogInt: () => ({
type: types.CLEAR_UPLOAD_DIALOG
}),
toggleProgressDialog: () => ({