aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/profiles.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-24 13:38:48 -0400
committerGitHub <noreply@github.com>2020-05-24 13:38:48 -0400
commit3089bb7908e42e9101241476f700033df82e685d (patch)
tree47fa735e94a220d404cfc4fe86cd99d1df3c3ca6 /ext/bg/js/settings/profiles.js
parenta595a0a48193f28f248191d146f5e476a2f04df6 (diff)
Settings refactor (#541)
* Remove debug info * Trigger onOptionsUpdated instead of formWrite when profile changes * Update how Anki field changes are observed * Update how general.enableClipboardPopups setting is changed * Change where ankiTemplatesUpdateValue occurs * Change where onDictionaryOptionsChanged occurs * Remove unused global declarations * Remove stray data attribute
Diffstat (limited to 'ext/bg/js/settings/profiles.js')
-rw-r--r--ext/bg/js/settings/profiles.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/bg/js/settings/profiles.js b/ext/bg/js/settings/profiles.js
index e32d5525..59f7fbb1 100644
--- a/ext/bg/js/settings/profiles.js
+++ b/ext/bg/js/settings/profiles.js
@@ -19,9 +19,8 @@
* ConditionsUI
* api
* conditionsClearCaches
- * formWrite
* getOptionsFullMutable
- * getOptionsMutable
+ * onOptionsUpdated
* profileConditionsDescriptor
* profileConditionsDescriptorPromise
* settingsSaveOptions
@@ -131,10 +130,7 @@ function profileOptionsPopulateSelect(select, profiles, currentValue, ignoreIndi
async function profileOptionsUpdateTarget(optionsFull) {
await profileFormWrite(optionsFull);
-
- const optionsContext = getOptionsContext();
- const options = await getOptionsMutable(optionsContext);
- await formWrite(options);
+ await onOptionsUpdated({source: null});
}
function profileOptionsCreateCopyName(name, profiles, maxUniqueAttempts) {