summaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/dictionary-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/settings/dictionary-controller.js')
-rw-r--r--ext/js/pages/settings/dictionary-controller.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/js/pages/settings/dictionary-controller.js b/ext/js/pages/settings/dictionary-controller.js
index e12017f2..17abfa13 100644
--- a/ext/js/pages/settings/dictionary-controller.js
+++ b/ext/js/pages/settings/dictionary-controller.js
@@ -190,10 +190,9 @@ class DictionaryEntry {
}
class DictionaryController {
- constructor(settingsController, modalController, storageController, statusFooter) {
+ constructor(settingsController, modalController, statusFooter) {
this._settingsController = settingsController;
this._modalController = modalController;
- this._storageController = storageController;
this._statusFooter = statusFooter;
this._dictionaries = null;
this._dictionaryEntries = [];
@@ -436,7 +435,6 @@ class DictionaryController {
const index = this._dictionaryEntries.findIndex((entry) => entry.dictionaryTitle === dictionaryTitle);
if (index < 0) { return; }
- const storageController = this._storageController;
const statusFooter = this._statusFooter;
const {node} = this._dictionaryEntries[index];
const progressSelector = '.dictionary-delete-progress';
@@ -483,7 +481,7 @@ class DictionaryController {
if (statusFooter !== null) { statusFooter.setTaskActive(progressSelector, false); }
this._setButtonsEnabled(true);
this._isDeleting = false;
- if (storageController !== null) { storageController.updateStats(); }
+ this._triggerStorageChanged();
}
}
@@ -547,6 +545,10 @@ class DictionaryController {
}
}
+ _triggerStorageChanged() {
+ yomichan.trigger('storageChanged');
+ }
+
static createDefaultDictionarySettings() {
return {
enabled: false,