Skip to content

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

Disabling location tags do not clean the location based tag groups from the tag library (#2272)

Stanimir0744a55e0398
diff --git a/src/renderer/components/TagLibrary.tsx b/src/renderer/components/TagLibrary.tsx
index c73e2209d..b29eafc36 100644
--- a/src/renderer/components/TagLibrary.tsx
+++ b/src/renderer/components/TagLibrary.tsx
@@ -76,7 +76,7 @@ function TagLibrary(props: Props) {
const { getTagGroups } = useTagGroupsLocationContext();
const { selectedEntries } = useSelectedEntriesContext();
const { readOnlyMode, findLocation, locations } = useCurrentLocationContext();
- const { tagGroups, reflectTagLibraryChanged } = useEditedTagLibraryContext();
+ const { tagGroups } = useEditedTagLibraryContext();
const dispatch: AppDispatch = useDispatch();
const tagBackgroundColor = useSelector(getTagColor);
const tagTextColor = useSelector(getTagTextColor);
@@ -219,6 +219,9 @@ function TagLibrary(props: Props) {
};
const renderTagGroup = (tagGroup, index) => {
+ if (!saveTagInLocation && tagGroup.locationId) {
+ return null;
+ }
// eslint-disable-next-line no-param-reassign
tagGroup.expanded = !(
tagGroupCollapsed && tagGroupCollapsed.includes(tagGroup.uuid)