mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
fix: replace toggle with show for main window in lightweight mode exit #4697
This commit is contained in:
@@ -535,7 +535,7 @@ impl Tray {
|
|||||||
}),
|
}),
|
||||||
"main_window" => Box::pin(async move {
|
"main_window" => Box::pin(async move {
|
||||||
if !lightweight::exit_lightweight_mode().await {
|
if !lightweight::exit_lightweight_mode().await {
|
||||||
WindowManager::toggle_main_window().await;
|
WindowManager::show_main_window().await;
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
_ => Box::pin(async move {}),
|
_ => Box::pin(async move {}),
|
||||||
@@ -974,7 +974,7 @@ fn on_menu_event(_: &AppHandle, event: MenuEvent) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if !lightweight::exit_lightweight_mode().await {
|
if !lightweight::exit_lightweight_mode().await {
|
||||||
WindowManager::toggle_main_window().await;
|
WindowManager::show_main_window().await;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
"system_proxy" => {
|
"system_proxy" => {
|
||||||
|
|||||||
@@ -209,8 +209,6 @@ pub async fn exit_lightweight_mode() -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WindowManager::show_main_window().await;
|
WindowManager::show_main_window().await;
|
||||||
WindowManager::toggle_main_window().await;
|
|
||||||
println!("what the fuck you want");
|
|
||||||
|
|
||||||
set_lightweight_mode(false).await;
|
set_lightweight_mode(false).await;
|
||||||
let _ = cancel_light_weight_timer();
|
let _ = cancel_light_weight_timer();
|
||||||
|
|||||||
Reference in New Issue
Block a user