mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 21:23:45 +08:00
Revert "chore: remove useless exit codes and hooks"
This reverts commit 40ff3fd4bf59f52f23904c3150de6ff17974d23f.
This commit is contained in:
parent
84fe9c84a8
commit
e9721ecc4d
@ -428,6 +428,7 @@ 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();
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -110,6 +110,7 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,6 +134,9 @@ 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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user