소스 검색

fix: prevent_exit

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");
 
     app.run(|app_handle, e| match e {
+        tauri::RunEvent::ExitRequested { api, .. } => {
+            api.prevent_exit();
+        }
         tauri::RunEvent::Updater(tauri::UpdaterEvent::Downloaded) => {
             resolve::resolve_reset();
             api::process::kill_children();