TagSpaces is an offline, open source, document manager with tagging support
fix: manipulate tags on files it scrolls back all the way to the top (#2009)
Stanimird856063be40a
diff --git a/app/hooks/DirectoryContentContextProvider.tsx b/app/hooks/DirectoryContentContextProvider.tsxindex e44a8af87..e250e47a1 100644--- a/app/hooks/DirectoryContentContextProvider.tsx+++ b/app/hooks/DirectoryContentContextProvider.tsx@@ -259,6 +259,8 @@ export const DirectoryContentContextProvider = ({GlobalSearch.getInstance().setResults(newDirectoryEntries);} else {*/setCurrentDirectoryEntries(newDirectoryEntries);+ // setSelectedEntries newEntry to scroll into it+ setSelectedEntries([newEntry]);//}}} /*else if (action === 'delete') {diff --git a/app/hooks/FsActionsContextProvider.tsx b/app/hooks/FsActionsContextProvider.tsxindex 37537e95f..b451159bc 100644--- a/app/hooks/FsActionsContextProvider.tsx+++ b/app/hooks/FsActionsContextProvider.tsx@@ -142,7 +142,7 @@ export const FsActionsContextProvider = ({dispatch(AppActions.reflectRenameEntry(filePath, newFilePathFromPromise),);- setSelectedEntries([]);+ // setSelectedEntries([]);console.info('Renaming meta file and thumb successful from ' +filePath +diff --git a/app/i18nBackend.ts b/app/i18nBackend.tsdeleted file mode 100644index bc51d6cae..000000000--- a/app/i18nBackend.ts+++ /dev/null@@ -1,48 +0,0 @@-/**- * TagSpaces - universal file and folder organizer- * Copyright (C) 2017-present TagSpaces UG (haftungsbeschraenkt)- *- * This program is free software: you can redistribute it and/or modify- * it under the terms of the GNU Affero General Public License (version 3) as- * published by the Free Software Foundation.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the- * GNU Affero General Public License for more details.- *- * You should have received a copy of the GNU Affero General Public License- * along with this program. If not, see <https://www.gnu.org/licenses/>.- *- */--/* import i18n from 'i18next';-import Backend from 'i18next-fs-backend';-// import LanguageDetector from 'i18next-browser-languagedetector';--const { join } = require('path');-const { readdirSync, lstatSync } = require('fs');--i18n.use(Backend);-if (!i18n.isInitialized) {- i18n.init({- debug: false,- initImmediate: false,- fallbackLng: 'en',- lng: 'en',- preload: readdirSync(join(__dirname, '../locales')).filter(fileName => {- const joinedPath = join(join(__dirname, '../locales'), fileName);- return lstatSync(joinedPath).isDirectory();- }),- ns: 'backend-app',- defaultNS: 'backend-app',- backend: {- loadPath: join(__dirname, '../locales/{{lng}}/core.json')- },- react: {- wait: false- }- });-}--export default i18n; */diff --git a/app/services/i18nInit.ts b/app/services/i18nInit.tsindex 5a11afa09..e8ce62579 100644--- a/app/services/i18nInit.ts+++ b/app/services/i18nInit.ts@@ -20,11 +20,11 @@ import i18n from 'i18next';import i18nOptions from '-/services/i18nOptions';import HttpBackend, { HttpBackendOptions } from 'i18next-http-backend';import { initReactI18next } from 'react-i18next';-import LanguageDetector from 'i18next-browser-languagedetector';+//import LanguageDetector from 'i18next-browser-languagedetector';const initI18n = async () => {await i18n- .use(LanguageDetector)+ //.use(LanguageDetector).use(initReactI18next).use(HttpBackend).init<HttpBackendOptions>(i18nOptions);diff --git a/package-lock.json b/package-lock.jsonindex 48b3f4030..d47fb8a1c 100644--- a/package-lock.json+++ b/package-lock.json@@ -45,7 +45,6 @@"geolocation-utils": "^1.2.5","html2canvas": "^1.3.3","i18next": "^23.4.6",- "i18next-browser-languagedetector": "^7.1.0","i18next-http-backend": "^2.2.2","leaflet": "^1.9.4","marked": "^4.0.12",@@ -22704,14 +22703,6 @@"@babel/runtime": "^7.22.5"}},- "node_modules/i18next-browser-languagedetector": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.1.0.tgz",- "integrity": "sha512-cr2k7u1XJJ4HTOjM9GyOMtbOA47RtUoWRAtt52z43r3AoMs2StYKyjS3URPhzHaf+mn10hY9dZWamga5WPQjhA==",- "dependencies": {- "@babel/runtime": "^7.19.4"- }- },"node_modules/i18next-http-backend": {"version": "2.3.1","resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.3.1.tgz",diff --git a/package.json b/package.jsonindex 31ea3f526..a2cb83ca6 100644--- a/package.json+++ b/package.json@@ -175,7 +175,6 @@"geolocation-utils": "^1.2.5","html2canvas": "^1.3.3","i18next": "^23.4.6",- "i18next-browser-languagedetector": "^7.1.0","i18next-http-backend": "^2.2.2","leaflet": "^1.9.4","marked": "^4.0.12",