chore: update tauri

This commit is contained in:
GyDi
2022-03-29 23:05:32 +08:00
parent d26830d81e
commit bb8a59d1db
5 changed files with 371 additions and 711 deletions

View File

@@ -144,11 +144,14 @@ fn main() -> std::io::Result<()> {
.build(tauri::generate_context!())
.expect("error while running tauri application")
.run(|app_handle, e| match e {
tauri::RunEvent::CloseRequested { label, api, .. } => {
let app_handle = app_handle.clone();
api.prevent_close();
app_handle.get_window(&label).unwrap().hide().unwrap();
}
tauri::RunEvent::WindowEvent { label, event, .. } => match event {
tauri::WindowEvent::CloseRequested { api, .. } => {
let app_handle = app_handle.clone();
api.prevent_close();
app_handle.get_window(&label).unwrap().hide().unwrap();
}
_ => {}
},
tauri::RunEvent::ExitRequested { .. } => {
resolve::resolve_reset(app_handle);
api::process::kill_children();