Skip to content

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

TSN345---Geo-tagging-and-custom-date-tagging-many-selected-files-does-not-work

Stanimir943c3330c96d
diff --git a/app/components/dialogs/EditEntryTagDialog.tsx b/app/components/dialogs/EditEntryTagDialog.tsx
index 4cc67b7ec..4c26fcd2f 100644
--- a/app/components/dialogs/EditEntryTagDialog.tsx
+++ b/app/components/dialogs/EditEntryTagDialog.tsx
@@ -32,7 +32,7 @@ import Dialog from '@material-ui/core/Dialog';
import i18n from '-/services/i18n';
import { isPlusCode } from '-/utils/misc';
import { Pro } from '-/pro';
-import { getSelectedTag } from '-/reducers/app';
+import { getSelectedEntries, getSelectedTag } from '-/reducers/app';
import TaggingActions, { defaultTagLocation } from '-/reducers/tagging-actions';
import { isDateTimeTag } from '-/utils/dates';
import { AppConfig } from '-/config';
@@ -53,7 +53,8 @@ interface Props {
fullScreen: boolean;
onClose: () => void;
editTagForEntry: (path: string, tag: TS.Tag, title: string) => void;
- currentEntryPath: string;
+ // currentEntryPath: string;
+ selectedEntries: Array<TS.FileSystemEntry>;
selectedTag: TS.Tag;
}
@@ -101,7 +102,13 @@ const EditEntryTagDialog = (props: Props) => {
function onConfirm() {
if (!haveError()) {
- props.editTagForEntry(props.currentEntryPath, props.selectedTag, title);
+ if (props.selectedEntries.length > 0) {
+ props.selectedEntries.forEach(entry =>
+ props.editTagForEntry(entry.path, props.selectedTag, title)
+ );
+ } else {
+ props.editTagForEntry(props.selectedTag.path, props.selectedTag, title);
+ }
props.onClose();
}
}
@@ -219,9 +226,10 @@ const EditEntryTagDialog = (props: Props) => {
function mapStateToProps(state) {
return {
selectedTag: getSelectedTag(state),
- currentEntryPath: getSelectedTag(state)
+ /* currentEntryPath: getSelectedTag(state)
? getSelectedTag(state).path
- : undefined
+ : undefined, */
+ selectedEntries: getSelectedEntries(state)
};
}