Skip to content

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

fix issue with openAfterCreate parameter in addLocation

sytolk79b43d7bbf67
diff --git a/src/renderer/hooks/CurrentLocationContextProvider.tsx b/src/renderer/hooks/CurrentLocationContextProvider.tsx
index 222f0fef8..395be7f8f 100644
--- a/src/renderer/hooks/CurrentLocationContextProvider.tsx
+++ b/src/renderer/hooks/CurrentLocationContextProvider.tsx
@@ -276,7 +276,7 @@ export const CurrentLocationContextProvider = ({
isReadOnly: false,
disableIndexing: false,
});
- addLocation(location);
+ addLocation(location, false);
});
}
return true;
@@ -294,8 +294,12 @@ export const CurrentLocationContextProvider = ({
}
}
- function addLocation(location: CommonLocation) {
- addLocationInt(location); //, openAfterCreate, locationPosition);
+ function addLocation(
+ location: CommonLocation,
+ openAfterCreate = true,
+ locationPosition: number = undefined,
+ ) {
+ addLocationInt(location, openAfterCreate, locationPosition);
sendMessage('addLocation', toTsLocation(location));
}