diff --git a/omega-target/src/options.coffee b/omega-target/src/options.coffee index 2ccb223..6b24165 100644 --- a/omega-target/src/options.coffee +++ b/omega-target/src/options.coffee @@ -259,6 +259,10 @@ class Options color: '#00cccc' ) version = changes['schemaVersion'] = options['schemaVersion'] = 2 + OmegaPac.Profiles.each options, (key, profile) -> + if profile.syncOptions is 'disabled' + delete profile['syncOptions'] + delete profile['syncError'] if version == 2 # Current schemaVersion. Promise.resolve([options, changes]) diff --git a/omega-target/src/options_sync.coffee b/omega-target/src/options_sync.coffee index f2cb5b2..4e353bc 100644 --- a/omega-target/src/options_sync.coffee +++ b/omega-target/src/options_sync.coffee @@ -50,7 +50,6 @@ class OptionsSync ###* # Merge newVal and oldVal of a given key. The default implementation choose # between newVal and oldVal based on the following rules: - # 1. Choose oldVal if syncOptions is 'disabled' in either oldVal or newVal. # 2. Choose oldVal if it has a revision newer than or equal to that of newVal. # 3. Choose oldVal if it deeply equals newVal. # 4. Otherwise, choose newVal. @@ -67,8 +66,6 @@ class OptionsSync ) return (key, newVal, oldVal) -> return oldVal if newVal == oldVal - if oldVal?.syncOptions == 'disabled' or newVal?.syncOptions == 'disabled' - return oldVal if oldVal?.revision? and newVal?.revision? result = Revision.compare(oldVal.revision, newVal.revision) return oldVal if result >= 0 @@ -176,9 +173,6 @@ class OptionsSync ### copyTo: (local) -> Promise.join local.get(null), @storage.get(null), (base, changes) => - for own key of base when not (key of changes) - if key[0] == '+' and not base[key]?.syncOptions == 'disabled' - changes[key] = undefined local.apply( changes: changes base: base