Skip to content

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

fix: KanBan 2

sytolkd1f6b704b716
diff --git a/src/renderer/hooks/FsActionsContextProvider.tsx b/src/renderer/hooks/FsActionsContextProvider.tsx
index 19628b822..f9cfad85e 100644
--- a/src/renderer/hooks/FsActionsContextProvider.tsx
+++ b/src/renderer/hooks/FsActionsContextProvider.tsx
@@ -104,9 +104,9 @@ export const FsActionsContextProvider = ({
reflectRenameEntries([[directoryPath, newDirPath]]).then(() => {
reflectRenameOpenedEntry(directoryPath, newDirPath);
reflectRenameEntry(directoryPath, newDirPath);
- /*dispatch(
+ dispatch(
AppActions.reflectRenameEntry(directoryPath, newDirPath),
- );*/
+ );
});
}
setSelectedEntries([]);
@@ -177,12 +177,12 @@ export const FsActionsContextProvider = ({
() => {
reflectRenameOpenedEntry(filePath, newFilePathFromPromise);
reflectRenameEntry(filePath, newFilePathFromPromise);
- /*dispatch(
+ dispatch(
AppActions.reflectRenameEntry(
filePath,
newFilePathFromPromise,
),
- );*/
+ );
},
);
}
@@ -201,12 +201,12 @@ export const FsActionsContextProvider = ({
() => {
reflectRenameOpenedEntry(filePath, newFilePathFromPromise);
reflectRenameEntry(filePath, newFilePathFromPromise);
- /*dispatch(
+ dispatch(
AppActions.reflectRenameEntry(
filePath,
newFilePathFromPromise,
),
- );*/
+ );
},
);
}
diff --git a/src/renderer/hooks/TaggingActionsContextProvider.tsx b/src/renderer/hooks/TaggingActionsContextProvider.tsx
index fcba8c9e2..aab10abc5 100644
--- a/src/renderer/hooks/TaggingActionsContextProvider.tsx
+++ b/src/renderer/hooks/TaggingActionsContextProvider.tsx
@@ -374,7 +374,10 @@ export const TaggingActionsContextProvider = ({
prefixTagContainer,
);
return renameFile(path, newFilePath, reflect).then(() => {
- reflectRenameOpenedEntry(path, newFilePath);
+ if (!reflect) {
+ reflectRenameOpenedEntry(path, newFilePath);
+ dispatch(AppActions.reflectRenameEntry(path, newFilePath));
+ }
return [path, newFilePath];
});
}
@@ -409,7 +412,10 @@ export const TaggingActionsContextProvider = ({
);
if (path !== newFilePath) {
return renameFile(path, newFilePath, reflect).then(() => {
- reflectRenameOpenedEntry(path, newFilePath);
+ if (!reflect) {
+ reflectRenameOpenedEntry(path, newFilePath);
+ dispatch(AppActions.reflectRenameEntry(path, newFilePath));
+ }
return [path, newFilePath];
});
}
@@ -688,7 +694,10 @@ export const TaggingActionsContextProvider = ({
console.warn('Error removing tags for ' + path + ' with ' + error);
// dispatch(AppActions.showNotification(t('core:removingSidecarTagsFailed'), 'error', true));
return removeTagsFromFilename().then((newFilePath) => {
- reflectRenameOpenedEntry(path, newFilePath);
+ if (!reflect) {
+ reflectRenameOpenedEntry(path, newFilePath);
+ dispatch(AppActions.reflectRenameEntry(path, newFilePath));
+ }
return [path, newFilePath];
});
});
@@ -773,6 +782,9 @@ export const TaggingActionsContextProvider = ({
reject(new Error('Error renaming file'));
return;
}
+ if (!reflect) {
+ dispatch(AppActions.reflectRenameEntry(path, newFilePath));
+ }
// reflectRenameOpenedEntry(path, newFilePath, true);
}
resolve(newFilePath);