Skip to content

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

fix: showing false in front of folder description

Ilian Sapundshieve83896b81990
diff --git a/app/perspectives/grid-perspective/components/CellContent.tsx b/app/perspectives/grid-perspective/components/CellContent.tsx
index d8aa3b695..334a841a3 100644
--- a/app/perspectives/grid-perspective/components/CellContent.tsx
+++ b/app/perspectives/grid-perspective/components/CellContent.tsx
@@ -91,10 +91,15 @@ const CellContent = (props: Props) => {
);
let description = removeMd(fsEntry.description);
+
if (description.length > maxDescriptionPreviewLength) {
description = description.substr(0, maxDescriptionPreviewLength) + '...';
}
+ if (description && fsEntry.isFile) {
+ description = ' | ' + description;
+ }
+
const fsEntryColor = findColorForFileEntry(
fsEntry.extension,
fsEntry.isFile,
@@ -325,9 +330,7 @@ const CellContent = (props: Props) => {
fsEntry.lmdt &&
formatDateTime(fsEntry.lmdt, false)}
</span>
- <span title={i18n.t('core:entryDescription')}>
- {description && (fsEntry.isFile && ' | ') + description}
- </span>
+ <span title={i18n.t('core:entryDescription')}>{description}</span>
</Typography>
</Grid>
)}