mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
move glossary (def text) to a separate db file
This commit is contained in:
1 parent
729f6635fc
commit
afeb43fc2c
15 files changed
+687
-299
No files matched your search
@@ -97,7 +97,9 @@ pub async fn import_yomitan_dict(
|
||||
data_dir.push(lang);
|
||||
data_dir.push(bundle_name);
|
||||
|
||||
let mut writer = state.get_yomitan_writer()?;
|
||||
let mut writer = state.get_yomitan_writer(|r| {
|
||||
app.emit("yomitan-import-progress", r).unwrap();
|
||||
})?;
|
||||
AppService::import_yomitan_zip_file(&mut writer, &data_dir, lang, |r| {
|
||||
app.emit("yomitan-import-progress", r).unwrap();
|
||||
})
|
||||
@@ -105,11 +107,14 @@ pub async fn import_yomitan_dict(
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn remove_yomitan_dict(
|
||||
app: AppHandle,
|
||||
bundle_name: &str,
|
||||
lang: &str,
|
||||
state: tauri::State<'_, AppService>,
|
||||
) -> Result<(), CJDicError> {
|
||||
let mut writer = state.get_yomitan_writer()?;
|
||||
let mut writer = state.get_yomitan_writer(|r| {
|
||||
app.emit("yomitan-import-progress", r).unwrap();
|
||||
})?;
|
||||
AppService::remove_yomitan_dictionary(&mut writer, bundle_name, lang)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user