From 0defb65115551e71a26b40af2424ab18bd20dc8e Mon Sep 17 00:00:00 2001 From: BTMuli Date: Tue, 12 Dec 2023 14:52:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B1=20=E5=B0=9D=E8=AF=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20macOS=20=E9=97=AA=E9=80=80=E9=97=AE=E9=A2=98=20#69?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 624bd33f..94d24c79 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -120,7 +120,11 @@ fn main() { let _window = _app.get_window("TeyvatGuide").unwrap(); let _mhy = _app.get_window("mhy_client"); if _mhy.is_some() { - _mhy.unwrap().close().unwrap(); + std::thread::spawn(move || { + std::thread::sleep(std::time::Duration::from_secs(2)); + dbg!("close mhy_client"); + _mhy.unwrap().close().unwrap(); + }); } #[cfg(debug_assertions)] // only include this code on debug builds _window.open_devtools(); // open the devtools on startup