aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-08-14 11:46:26 -0400
committerGitHub <noreply@github.com>2021-08-14 11:46:26 -0400
commit3e350bd563886e49fed309731d99f37e6f3ab320 (patch)
tree688f3ca34cc53203df99b2126e334e3c817da281 /ext/js/pages/settings
parentcd78d56feedef1475ce8ddb98e208c7a004819df (diff)
Dictionary worker refactor (#1894)
* Rename dictionary worker files * Rename classes * Rename file * Rename class * Generalize the _invoke method * Rename 'import' to 'importDictionary' * Improve DictionaryImporterMediaLoader usage * Refactor message handler * Generalize onProgress event
Diffstat (limited to 'ext/js/pages/settings')
-rw-r--r--ext/js/pages/settings/dictionary-import-controller.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js
index addba1fa..2716756d 100644
--- a/ext/js/pages/settings/dictionary-import-controller.js
+++ b/ext/js/pages/settings/dictionary-import-controller.js
@@ -17,7 +17,7 @@
/* global
* DictionaryController
- * DictionaryImporterThreaded
+ * DictionaryDatabaseModifier
*/
class DictionaryImportController {
@@ -212,9 +212,9 @@ class DictionaryImportController {
}
async _importDictionary(file, importDetails, onProgress) {
- const dictionaryImporter = new DictionaryImporterThreaded(onProgress);
const archiveContent = await this._readFile(file);
- const {result, errors} = await dictionaryImporter.importDictionary(archiveContent, importDetails);
+ const dictionaryDatabaseModifier = new DictionaryDatabaseModifier();
+ const {result, errors} = await dictionaryDatabaseModifier.importDictionary(archiveContent, importDetails, onProgress);
yomichan.api.triggerDatabaseUpdated('dictionary', 'import');
const errors2 = await this._addDictionarySettings(result.sequenced, result.title);