aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-01 11:20:50 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-01 21:00:43 -0500
commit748cd27ad09526e4ec8fd309c6a85fdba1e2462c (patch)
treeb17e96bb9b2d9ce780c3634933fd580400a061b5 /ext/bg/js
parent566012f228452a4113e83f76d1c53be1f1f41643 (diff)
Remove argument from onDictionaryOptionsChanged
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/settings/dictionaries.js8
-rw-r--r--ext/bg/js/settings/main.js2
2 files changed, 7 insertions, 3 deletions
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);
}