diff --git a/packages/loot-core/src/server/sync/index.ts b/packages/loot-core/src/server/sync/index.ts index 81a4679df7c..843da6e4480 100644 --- a/packages/loot-core/src/server/sync/index.ts +++ b/packages/loot-core/src/server/sync/index.ts @@ -768,11 +768,15 @@ async function _fullSync( ), ); } else { - // All synced up, store the current time as a simple optimization - // for the next sync - await prefs.savePrefs({ - lastSyncedTimestamp: getClock().timestamp.toString(), - }); + // All synced up, store the current time as a simple optimization for the next sync + const requiresUpdate = + getClock().timestamp.toString() !== lastSyncedTimestamp; + + if (requiresUpdate) { + await prefs.savePrefs({ + lastSyncedTimestamp: getClock().timestamp.toString(), + }); + } } return receivedMessages; diff --git a/upcoming-release-notes/3398.md b/upcoming-release-notes/3398.md new file mode 100644 index 00000000000..77d83012409 --- /dev/null +++ b/upcoming-release-notes/3398.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MikesGlitch] +--- + +Prevent sync from saving to metadata.json unnecessarily