Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #6755 from brave/fix/syncing-0.13.1-site-settings-…
Browse files Browse the repository at this point in the history
…once

On Sync init only send siteSettings without objectId
  • Loading branch information
ayumi authored Jan 20, 2017
2 parents ff8a691 + 7e93218 commit 6402409
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,12 @@ module.exports.onSyncReady = (isFirstRun, e) => {
[syncUtil.createSiteData(site.toJS(), i)])
}
})
// Sync site settings in case they changed while sync was disabled
// Sync site settings that have not been synced yet
// FIXME: If Sync was disabled and settings were changed, those changes
// might not be synced.
const siteSettings =
appState.get('siteSettings').filter((value, key) => {
return syncUtil.isSyncable('siteSetting', value)
return !value.get('objectId') && syncUtil.isSyncable('siteSetting', value)
}).toJS()
if (siteSettings) {
sendSyncRecords(e.sender, writeActions.UPDATE,
Expand Down

0 comments on commit 6402409

Please sign in to comment.