From 748cd27ad09526e4ec8fd309c6a85fdba1e2462c Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 1 Feb 2020 11:20:50 -0500 Subject: Remove argument from onDictionaryOptionsChanged --- ext/bg/js/settings/dictionaries.js | 8 ++++++-- ext/bg/js/settings/main.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'ext/bg') diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionaries.js index 545e128d..31f47bfd 100644 --- a/ext/bg/js/settings/dictionaries.js +++ b/ext/bg/js/settings/dictionaries.js @@ -361,12 +361,16 @@ async function dictSettingsInitialize() { const optionsContext = getOptionsContext(); const options = await getOptionsMutable(optionsContext); - onDictionaryOptionsChanged(options); + onDictionaryOptionsChanged(); onDatabaseUpdated(options); } -async function onDictionaryOptionsChanged(options) { +async function onDictionaryOptionsChanged() { if (dictionaryUI === null) { return; } + + const optionsContext = getOptionsContext(); + const options = await getOptionsMutable(optionsContext); + dictionaryUI.setOptionsDictionaries(options.dictionaries); const optionsFull = await apiOptionsGetFull(); diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 3bf65eda..6e162ffc 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -167,7 +167,7 @@ async function formWrite(options) { await ankiTemplatesUpdateValue(); await onAnkiOptionsChanged(options); - await onDictionaryOptionsChanged(options); + await onDictionaryOptionsChanged(); formUpdateVisibility(options); } -- cgit v1.2.3