Skip to content

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

fix Adding description to the current folder in the entry properties not reflected in details and description of the perspective if turned on

sytolk94cfaab386cc
diff --git a/app/perspectives/grid-perspective/components/GridPagination.tsx b/app/perspectives/grid-perspective/components/GridPagination.tsx
index eaf030683..965da000b 100644
--- a/app/perspectives/grid-perspective/components/GridPagination.tsx
+++ b/app/perspectives/grid-perspective/components/GridPagination.tsx
@@ -724,6 +724,7 @@ const areEqual = (prevProp: Props, nextProp: Props) =>
nextProp.thumbnailMode === prevProp.thumbnailMode &&
nextProp.entrySize === prevProp.entrySize &&
nextProp.gridPageLimit === prevProp.gridPageLimit &&
+ nextProp.currentDirectoryDescription === prevProp.currentDirectoryDescription &&
JSON.stringify(nextProp.files) === JSON.stringify(prevProp.files) &&
JSON.stringify(nextProp.directories) ===
JSON.stringify(prevProp.directories) &&
diff --git a/app/reducers/app.ts b/app/reducers/app.ts
index 78fba5a5a..2e25b1d51 100644
--- a/app/reducers/app.ts
+++ b/app/reducers/app.ts
@@ -554,7 +554,11 @@ export default (state: any = initialState, action: any) => {
openedFiles: [
action.file
// ...state.openedFiles // TODO uncomment for multiple file support
- ]
+ ],
+ ...(action.file.path === state.currentDirectoryPath &&
+ action.file.description && {
+ currentDirectoryDescription: action.file.description
+ })
};
}
case types.TOGGLE_ENTRY_FULLWIDTH: {