summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/settings-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-30 09:33:13 -0400
committerGitHub <noreply@github.com>2020-05-30 09:33:13 -0400
commit63a3e56367b95f7ea64a5701d17179de60ed8718 (patch)
treefc811028b127abf9c1ff1dbdbb4663ba70b60649 /ext/bg/js/settings/settings-controller.js
parent1a5a37c9e47dc4d1f1e1b3ffaf990e792140b912 (diff)
Use SettingsController (#576)
* Use settingsController internally in settings/main.js * Replace modifyingProfileChange with SettingsController.optionsContextChanged * Update ClipboardPopupsController to use SettingsController * Store reference to checkbox * Use this._settingsController for everything * Change where current profile is initially assigned from * Remove some unnecessary async calls * Move setup calls * Update AnkiTemplatesController to use SettingsController * Cache default field templates * Update AnkiController to use SettingsController * Update AudioController to use SettingsController * Update SettingsBackup to use SettingsController * Update DictionaryController to use SettingsController * Update GenericSettingController to use SettingsController * Update ProfileController to use SettingsController * Remove unused * Remove unused * Replace some uses of api.options* functions * Fix missing awaits * Fix invalid function
Diffstat (limited to 'ext/bg/js/settings/settings-controller.js')
-rw-r--r--ext/bg/js/settings/settings-controller.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/bg/js/settings/settings-controller.js b/ext/bg/js/settings/settings-controller.js
index 61230226..9f903f48 100644
--- a/ext/bg/js/settings/settings-controller.js
+++ b/ext/bg/js/settings/settings-controller.js
@@ -65,6 +65,11 @@ class SettingsController extends EventDispatcher {
return utilBackend().getFullOptions();
}
+ async setOptionsFull(optionsFull) {
+ utilBackend().setFullOptions(utilBackgroundIsolate(optionsFull));
+ await this.save();
+ }
+
getOptionsContext() {
return {index: this._profileIndex};
}