TagSpaces is an offline, open source, document manager with tagging support
fix Created date in the revision history should be taken from the file name
sytolk8f80b9905b5d
diff --git a/src/renderer/components/Revisions.tsx b/src/renderer/components/Revisions.tsxindex db5889b89..ff9f83354 100644--- a/src/renderer/components/Revisions.tsx+++ b/src/renderer/components/Revisions.tsx@@ -20,6 +20,7 @@ import React, { useEffect, useState } from 'react';import {getBackupFileLocation,extractContainingDirectoryPath,+ extractFileNameWithoutExt,} from '@tagspaces/tagspaces-common/paths';import Tooltip from '-/components/Tooltip';import { OpenedEntry } from '-/reducers/app';@@ -73,6 +74,10 @@ function Revisions() {}}, [openedEntry]);+ function getLmdt(fileName) {+ return parseInt(extractFileNameWithoutExt(fileName));+ }+function loadHistoryItems(openedFile: OpenedEntry) {if (Pro) {Pro.MetaOperations.getMetadataID(openedFile.path, openedFile.uuid).then(@@ -90,7 +95,11 @@ function Revisions() {switchLocationTypeByID(openedFile.locationId).then(() => {PlatformIO.listDirectoryPromise(backupPath, []).then((h) => {- setRows(h.sort((a, b) => (a.lmdt < b.lmdt ? 1 : -1)));+ setRows(+ h.sort((a, b) =>+ getLmdt(a.name) < getLmdt(b.name) ? 1 : -1,+ ),+ );return switchCurrentLocationType();});})@@ -232,7 +241,7 @@ function Revisions() {{row.name}</TableCell><TableCell align="right" title={titleFormat(row.lmdt)}>- {cellFormat(row.lmdt)}+ {cellFormat(getLmdt(row.name))}</TableCell><TableCell align="right"><Tooltip title={t('core:view')}>