Skip to content

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

fix: deleting the currently opened file the file opener should close

sytolk2dca768e9ba2
diff --git a/app/hooks/IOActionsContextProvider.tsx b/app/hooks/IOActionsContextProvider.tsx
index 3ff1fb1dc..b563c230c 100644
--- a/app/hooks/IOActionsContextProvider.tsx
+++ b/app/hooks/IOActionsContextProvider.tsx
@@ -148,7 +148,11 @@ export const IOActionsContextProvider = ({
deleteFilePromise,
deleteDirectoryPromise
} = usePlatformFacadeContext();
- const { reflectDeleteDirectory, reflectDeleteFile } = useOpenedEntryContext();
+ const {
+ openedEntries,
+ reflectDeleteDirectory,
+ reflectDeleteFile
+ } = useOpenedEntryContext();
const {
currentDirectoryEntries,
currentDirectoryPath,
@@ -1003,7 +1007,7 @@ export const IOActionsContextProvider = ({
uploadFilesAPI,
uploadFiles
};
- }, [currentDirectoryEntries]);
+ }, [currentDirectoryEntries, openedEntries]);
return (
<IOActionsContext.Provider value={context}>