mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🌱 尝试修复 macOS 闪退问题 #69
This commit is contained in:
@@ -120,7 +120,11 @@ fn main() {
|
|||||||
let _window = _app.get_window("TeyvatGuide").unwrap();
|
let _window = _app.get_window("TeyvatGuide").unwrap();
|
||||||
let _mhy = _app.get_window("mhy_client");
|
let _mhy = _app.get_window("mhy_client");
|
||||||
if _mhy.is_some() {
|
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
|
#[cfg(debug_assertions)] // only include this code on debug builds
|
||||||
_window.open_devtools(); // open the devtools on startup
|
_window.open_devtools(); // open the devtools on startup
|
||||||
|
|||||||
Reference in New Issue
Block a user