From be59f248e8387c268471946da99979939c8d2c1d Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 9 Jan 2022 22:22:13 +0100 Subject: [PATCH 1/2] fix sync skipping some changes and then forcing sector queuing --- bin/copy-trilium.sh | 2 +- src/services/sync.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/copy-trilium.sh b/bin/copy-trilium.sh index c9439f79b..20797edfa 100755 --- a/bin/copy-trilium.sh +++ b/bin/copy-trilium.sh @@ -44,7 +44,7 @@ find $DIR/node_modules -name demo -exec rm -rf {} \; find $DIR/libraries -name "*.map" -type f -delete -rm -r $DIR/src/public/app +rm -rf $DIR/src/public/app sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' $DIR/src/views/desktop.ejs sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' $DIR/src/views/mobile.ejs diff --git a/src/services/sync.js b/src/services/sync.js index 210b3aa9f..d764d1ba8 100644 --- a/src/services/sync.js +++ b/src/services/sync.js @@ -149,8 +149,8 @@ async function pullChanges(syncContext) { sql.transactional(() => { for (const {entityChange, entity} of entityChanges) { - const changeAppliedAlready = !entityChange.changeId - || !!sql.getValue("SELECT id FROM entity_changes WHERE changeId = ?", [entityChange.changeId]); + const changeAppliedAlready = entityChange.changeId + && !!sql.getValue("SELECT id FROM entity_changes WHERE changeId = ?", [entityChange.changeId]); if (!changeAppliedAlready && !sourceIdService.isLocalSourceId(entityChange.sourceId)) { if (!atLeastOnePullApplied) { // send only for first From d04d3564294de18f4877d84ee2f709e5aaea4616 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 9 Jan 2022 22:32:13 +0100 Subject: [PATCH 2/2] release 0.49.4 --- package.json | 2 +- src/services/build.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dd535b26e..2ec348adb 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.49.3", + "version": "0.49.4", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { diff --git a/src/services/build.js b/src/services/build.js index e96a03068..380750302 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2022-01-06T23:09:17+01:00", buildRevision: "590eea11830531699643b381d06a6a59dd7704bb" }; +module.exports = { buildDate:"2022-01-09T22:32:13+01:00", buildRevision: "be59f248e8387c268471946da99979939c8d2c1d" };