diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-03-04 19:16:19 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-03-04 19:16:19 -0800 |
commit | db7e80dabfbaeec09c7cd30b4f36b3d68c6e52b6 (patch) | |
tree | 8072081db93083a212ac1da7addf617117f79e0d /ext/bg/js/options.js | |
parent | 30999c13d32e7f111db16814dc2cbb0f30825861 (diff) |
wip
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r-- | ext/bg/js/options.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index f06cc056..84ecc6e3 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -187,10 +187,7 @@ function onDictionaryPurge(e) { return optionsLoad(); }).then(options => { options.dictionaries = {}; - return optionsSave(options).then(() => { - populateDictionaries(options); - instYomi().optionsSet(options); - }); + return optionsSave(options).then(populateDictionaries); }); } @@ -208,7 +205,7 @@ function onDictionaryImport() { optionsLoad().then(options => { instDb().importDictionary(dictUrl.val(), (total, current) => setProgress(current / total * 100.0)).then(summary => { options.dictionaries[summary.title] = {enabled: true, priority: 0}; - return optionsSave(options).then(() => instYomi().optionsSet(options)); + return optionsSave(options); }).then(() => populateDictionaries(options)).catch(showDictionaryError).then(() => { showDictionarySpinner(false); dictProgress.hide(); @@ -339,7 +336,7 @@ function onAnkiModelChanged(e) { optionsNew.anki[tabId].fields = {}; populateAnkiFields(element, optionsNew).then(() => { - optionsSave(optionsNew).then(() => instYomi().optionsSet(optionsNew)); + optionsSave(optionsNew); }).catch(showAnkiError).then(() => showAnkiSpinner(false)); }); } @@ -351,7 +348,6 @@ function onOptionsChanged(e) { getFormData().then(({optionsNew, optionsOld}) => { return optionsSave(optionsNew).then(() => { - instYomi().optionsSet(optionsNew); updateVisibility(optionsNew); const ankiUpdated = |