chore: remove useless exit codes

This commit is contained in:
huzibaca
2024-09-25 11:47:01 +08:00
parent 3bcd8b8b2c
commit 08b1160d63
5 changed files with 15 additions and 9 deletions

View File

@@ -134,8 +134,10 @@ pub fn run() {
.expect("error while running tauri application");
app.run(|_, e| match e {
tauri::RunEvent::ExitRequested { api, .. } => {
api.prevent_exit();
tauri::RunEvent::ExitRequested { api, code, .. } => {
if code.is_none() {
api.prevent_exit();
}
}
tauri::RunEvent::WindowEvent { label, event, .. } => {
if label == "main" {