Performance improvements

This commit is contained in:
Andras Schmelczer 2024-12-20 20:32:14 +00:00
commit 90bc893007
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -46,8 +46,6 @@ export async function syncLocallyDeletedFile({
createdDate: new Date(),
});
await database.removeDocument(relativePath);
history.addHistoryEntry({
status: SyncStatus.SUCCESS,
source: SyncSource.PUSH,
@ -55,6 +53,8 @@ export async function syncLocallyDeletedFile({
message: `Successfully deleted locally deleted file on the remote server`,
type: SyncType.DELETE,
});
await database.removeDocument(relativePath);
} catch (e) {
history.addHistoryEntry({
status: SyncStatus.ERROR,