Desktop,Mobile,Cli: Fixes #9800: Fix synchronization happens every 10 seconds even if nothing has changed #9814
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This fixes a sync info comparison issue caused by a typo in 7b06090.
Because
0.0.0
was written as0.00
inSyncInfo::load
andmergeSyncInfos
preferred the remoteappMinVersion
to the localappMinVersion
if equivalent (0.0.0
is equivalent to0.0.0
)sync targets that didn't have an
appMinVersion
property had it initialized to0.00
.Because
'0.0.0' !== '0.00'
,syncInfoEquals
would returnfalse
on each sync, causing the sync target remote info to be updated. DuringmergeSyncInfos
, the remote version (0.00
) was selected, and thus, the sync target continued to have0.00
in its info.json.The fix involves
mergeSyncInfos
when the versions are otherwise equal.Fixes #9800.
Testing
This has been tested successfully on Ubuntu 23.10 (sync interval set to 1 hour).