actually import settings from sync

fixes #331
This commit is contained in:
tophf 2018-01-24 03:47:26 +03:00
parent 5b4ecfc3e4
commit 10b82ae7cc

View File

@ -272,7 +272,7 @@ var prefs = new function Prefs() {
if (BG && BG !== window) return; if (BG && BG !== window) return;
if (BG === window) { if (BG === window) {
affectsIcon.forEach(key => this.broadcast(key, values[key], {sync: false})); affectsIcon.forEach(key => this.broadcast(key, values[key], {sync: false}));
chromeSync.getValue('settings', settings => importFromSync.call(this, settings)); chromeSync.getValue('settings').then(settings => importFromSync.call(this, settings));
} }
chrome.storage.onChanged.addListener((changes, area) => { chrome.storage.onChanged.addListener((changes, area) => {
if (area === 'sync' && 'settings' in changes) { if (area === 'sync' && 'settings' in changes) {