summaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/collapsible-dictionary-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-07-09 16:06:12 -0400
committerGitHub <noreply@github.com>2021-07-09 16:06:12 -0400
commitdaa44a8389806046ca8fde9fa1c96c1e961393f4 (patch)
treea8ee3ab06ac2783502cd13e88ac16fa86a659ca4 /ext/js/pages/settings/collapsible-dictionary-controller.js
parent24ec22b2e1095a18d2031f697f4aaffb5a0c0609 (diff)
Fix an issue with reordering dictionary settings (#1812)
Diffstat (limited to 'ext/js/pages/settings/collapsible-dictionary-controller.js')
-rw-r--r--ext/js/pages/settings/collapsible-dictionary-controller.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/js/pages/settings/collapsible-dictionary-controller.js b/ext/js/pages/settings/collapsible-dictionary-controller.js
index 6eb3a9b4..6a22e454 100644
--- a/ext/js/pages/settings/collapsible-dictionary-controller.js
+++ b/ext/js/pages/settings/collapsible-dictionary-controller.js
@@ -33,6 +33,7 @@ class CollapsibleDictionaryController {
yomichan.on('databaseUpdated', this._onDatabaseUpdated.bind(this));
this._settingsController.on('optionsChanged', this._onOptionsChanged.bind(this));
+ this._settingsController.on('dictionarySettingsReordered', this._onDictionarySettingsReordered.bind(this));
}
// Private
@@ -88,6 +89,11 @@ class CollapsibleDictionaryController {
this._setDefinitionsCollapsibleAll(value);
}
+ async _onDictionarySettingsReordered() {
+ const options = await this._settingsController.getOptions();
+ this._onOptionsChanged({options});
+ }
+
_setupAllSelect(fragment, options) {
const select = this._addSelect(fragment, 'All', '');