diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-31 18:08:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 18:08:51 -0400 |
commit | 01c5c5c04bd9234c64d6f57ee0ea65b0f478a1b7 (patch) | |
tree | f262b7042bd56fc9b72efb7b42d97341efd50df9 /ext/js/pages/settings/dictionary-import-controller.js | |
parent | 1d6e437fb284a591fc1b7f4aec87bbc7cde5367f (diff) |
Dictionary importer refactoring (#1867)
* Remove map of schemas
* Don't reuse dictionary importer instances
* Refactor
* Update how progress callback is used
Diffstat (limited to 'ext/js/pages/settings/dictionary-import-controller.js')
-rw-r--r-- | ext/js/pages/settings/dictionary-import-controller.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js index 5e51a48a..b18eeb6b 100644 --- a/ext/js/pages/settings/dictionary-import-controller.js +++ b/ext/js/pages/settings/dictionary-import-controller.js @@ -181,9 +181,9 @@ class DictionaryImportController { } async _importDictionary(file, importDetails, onProgress) { - const dictionaryImporter = new DictionaryImporterThreaded(); + const dictionaryImporter = new DictionaryImporterThreaded(onProgress); const archiveContent = await this._readFile(file); - const {result, errors} = await dictionaryImporter.importDictionary(archiveContent, importDetails, onProgress); + const {result, errors} = await dictionaryImporter.importDictionary(archiveContent, importDetails); yomichan.api.triggerDatabaseUpdated('dictionary', 'import'); const errors2 = await this._addDictionarySettings(result.sequenced, result.title); |