Skip to content

Commit

Permalink
🎨 避免关闭卡顿
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Oct 27, 2023
1 parent e1e4f80 commit d4295c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ fn main() {
// 子窗口 label 的数组
const SUB_WINDOW_LABELS: [&str; 3] = ["Sub_window", "Dev_JSON", "mhy_client"];
for label in SUB_WINDOW_LABELS.iter() {
let sub = window.get_window(label).unwrap();
sub.close().unwrap();
let sub = window.get_window(label);
if sub.is_some() {
sub.unwrap().close().unwrap();
}
}
}
window.close().unwrap();
Expand Down

0 comments on commit d4295c7

Please sign in to comment.