chore: remove useless exit codes and hooks

This commit is contained in:
huzibaca 2024-09-21 21:05:34 +08:00
parent e92074e586
commit 40ff3fd4bf
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302
3 changed files with 0 additions and 5 deletions

View File

@ -428,7 +428,6 @@ fn on_menu_event(app_handle: &AppHandle, event: MenuEvent) {
"restart_clash" => feat::restart_clash_core(), "restart_clash" => feat::restart_clash_core(),
"restart_app" => tauri::process::restart(&app_handle.env()), "restart_app" => tauri::process::restart(&app_handle.env()),
"quit" => { "quit" => {
println!("quit");
feat::quit(); feat::quit();
} }
_ => {} _ => {}

View File

@ -110,7 +110,6 @@ pub fn quit() {
let _ = resolve::save_window_size_position(&app_handle, true); let _ = resolve::save_window_size_position(&app_handle, true);
resolve::resolve_reset(); resolve::resolve_reset();
app_handle.exit(0); app_handle.exit(0);
std::process::exit(0);
} }
} }

View File

@ -135,9 +135,6 @@ pub fn run() {
.expect("error while running tauri application"); .expect("error while running tauri application");
app.run(|app_handle, e| match e { app.run(|app_handle, e| match e {
tauri::RunEvent::ExitRequested { api, .. } => {
api.prevent_exit();
}
tauri::RunEvent::WindowEvent { label, event, .. } => { tauri::RunEvent::WindowEvent { label, event, .. } => {
if label == "main" { if label == "main" {
match event { match event {