feat: maoos tray speed can be closed

This commit is contained in:
huzibaca
2025-01-13 20:48:25 +08:00
parent d0d5204cbc
commit 29ec4dc546
12 changed files with 59 additions and 18 deletions

View File

@@ -194,6 +194,7 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
let socks_port = patch.verge_socks_port;
let http_enabled = patch.verge_http_enabled;
let http_port = patch.verge_port;
let enable_tray_speed = patch.enable_tray_speed;
let res: std::result::Result<(), anyhow::Error> = {
let mut should_restart_core = false;
@@ -260,6 +261,10 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
should_update_systray_menu = true;
}
if enable_tray_speed.is_some() {
should_update_systray_icon = true;
}
if should_restart_core {
CoreManager::global().restart_core().await?;
}