Skip to content

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

fix: loosing tag color on drag and drop

Ilian Sapundshiev6f1e60cade45
diff --git a/app/reducers/tagging-actions.ts b/app/reducers/tagging-actions.ts
index f35f5d708..d7f13e893 100644
--- a/app/reducers/tagging-actions.ts
+++ b/app/reducers/tagging-actions.ts
@@ -112,7 +112,11 @@ const actions = {
!/^(?:\d+~\d+|\d+)$/.test(tag.title) && // skip adding of tag containing only digits
!isPlusCode(tag.title) // skip adding of tag containing geo information
) {
- uniqueTags.push(tag);
+ uniqueTags.push({
+ ...tag,
+ color: tag.color || settings.tagBackgroundColor,
+ textcolor: tag.textcolor || settings.tagTextColor
+ });
}
return true;
});
@@ -427,8 +431,8 @@ const actions = {
uniqueTags.push({
...tag,
title: newTagTitle,
- color: settings.tagBackgroundColor,
- textcolor: settings.tagTextColor
+ color: tag.color || settings.tagBackgroundColor,
+ textcolor: tag.textcolor || settings.tagTextColor
});
}
if (uniqueTags.length > 0) {