MystiPanda преди 1 година
родител
ревизия
966c453c27
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      src-tauri/src/main.rs

+ 3 - 0
src-tauri/src/main.rs

@@ -103,6 +103,9 @@ fn main() -> std::io::Result<()> {
         .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::Updater(tauri::UpdaterEvent::Downloaded) => {
         tauri::RunEvent::Updater(tauri::UpdaterEvent::Downloaded) => {
             resolve::resolve_reset();
             resolve::resolve_reset();
             api::process::kill_children();
             api::process::kill_children();