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