Add importDictionary function to Backend
This commit is contained in:
parent
c193a703cc
commit
02f7763f00
@ -299,6 +299,10 @@ class Backend {
|
||||
return true;
|
||||
}
|
||||
|
||||
async importDictionary(archiveSource, onProgress, details) {
|
||||
return await this.translator.database.importDictionary(archiveSource, onProgress, details);
|
||||
}
|
||||
|
||||
// Message handlers
|
||||
|
||||
_onApiYomichanCoreReady(_params, sender) {
|
||||
|
@ -118,7 +118,7 @@ async function utilDatabaseDeleteDictionary(dictionaryName, onProgress) {
|
||||
|
||||
async function utilDatabaseImport(data, onProgress, details) {
|
||||
data = await utilReadFile(data);
|
||||
return utilIsolate(await utilBackend().translator.database.importDictionary(
|
||||
return utilIsolate(await utilBackend().importDictionary(
|
||||
utilBackgroundIsolate(data),
|
||||
utilBackgroundFunctionIsolate(onProgress),
|
||||
utilBackgroundIsolate(details)
|
||||
|
Loading…
Reference in New Issue
Block a user