Skip to content

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

fix mapique

sytolk66bc2e2e3ce2
diff --git a/src/renderer/hooks/DirectoryContentContextProvider.tsx b/src/renderer/hooks/DirectoryContentContextProvider.tsx
index a42128b71..2682dcb2b 100644
--- a/src/renderer/hooks/DirectoryContentContextProvider.tsx
+++ b/src/renderer/hooks/DirectoryContentContextProvider.tsx
@@ -316,9 +316,17 @@ export const DirectoryContentContextProvider = ({
const enhancedEntriesPromises = metaChanged.map((entry) =>
getMetaForEntry(entry),
);
- Promise.all(enhancedEntriesPromises).then((entries) => {
+ Promise.allSettled(enhancedEntriesPromises).then((results) => {
+ const entries = results
+ .filter(({ status }) => status === 'fulfilled')
+ .map(
+ (p) => (p as PromiseFulfilledResult<TS.FileSystemEntry>).value,
+ );
updateCurrentDirEntries(entries);
});
+ /* Promise.all(enhancedEntriesPromises).then((entries) => {
+ updateCurrentDirEntries(entries);
+ });*/
}
return Promise.resolve(true);
};
diff --git a/src/renderer/hooks/PlatformFacadeContextProvider.tsx b/src/renderer/hooks/PlatformFacadeContextProvider.tsx
index a3884d577..7d56210af 100644
--- a/src/renderer/hooks/PlatformFacadeContextProvider.tsx
+++ b/src/renderer/hooks/PlatformFacadeContextProvider.tsx
@@ -28,7 +28,6 @@ import {
getThumbFileLocationForFile,
normalizePath,
} from '@tagspaces/tagspaces-common/paths';
-import PlatformIO from '-/services/platform-facade';
import { useTranslation } from 'react-i18next';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
import { useDispatch } from 'react-redux';
@@ -141,21 +140,21 @@ export const PlatformFacadeContextProvider = ({
function setFolderThumbnailPromise(filePath: string): Promise<string> {
const directoryPath = extractContainingDirectoryPath(
filePath,
- PlatformIO.getDirSeparator(),
+ PlatformFacade.getDirSeparator(),
);
const directoryName = extractDirectoryName(
directoryPath,
- PlatformIO.getDirSeparator(),
+ PlatformFacade.getDirSeparator(),
);
const sourceThumbPath = getThumbFileLocationForFile(
filePath,
- PlatformIO.getDirSeparator(),
+ PlatformFacade.getDirSeparator(),
false,
);
const destThumbPath = getThumbFileLocationForDirectory(
directoryPath,
- PlatformIO.getDirSeparator(),
+ PlatformFacade.getDirSeparator(),
);
return copyFilePromise(
@@ -204,8 +203,8 @@ export const PlatformFacadeContextProvider = ({
const ioJobPromises = paths.map((path) => {
const targetFile =
normalizePath(targetPath) +
- PlatformIO.getDirSeparator() +
- extractFileName(path, PlatformIO.getDirSeparator());
+ PlatformFacade.getDirSeparator() +
+ extractFileName(path, PlatformFacade.getDirSeparator());
return {
promise: copyFilePromiseOverwrite(path, targetFile),
path: path,
@@ -304,7 +303,7 @@ export const PlatformFacadeContextProvider = ({
return Promise.all(
renameJobs.map(async (renameJob) => {
try {
- return await PlatformIO.renameFilePromise(
+ return await PlatformFacade.renameFilePromise(
renameJob[0],
renameJob[1],
onProgress,