Skip to content

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

closing location of location remove

Ilian Sapundshievfc6f81acf323
diff --git a/app/reducers/locations.js b/app/reducers/locations.js
index f21e4f29f..480a0aa01 100644
--- a/app/reducers/locations.js
+++ b/app/reducers/locations.js
@@ -153,7 +153,13 @@ export const actions = {
type: types.EDIT_LOCATION,
location
}),
- removeLocation: (location: Location) => ({
+ removeLocation: (location: Location) => (
+ dispatch: (actions: Object) => void
+ ) => {
+ dispatch(AppActions.closeLocation(location.uuid));
+ dispatch(actions.deleteLocation(location));
+ },
+ deleteLocation: (location: Location) => ({
type: types.REMOVE_LOCATION,
location
})