chore: update

This commit is contained in:
huzibaca 2024-09-22 15:39:52 +08:00
parent 0792ac7de8
commit f9f1721d66
2 changed files with 2 additions and 12 deletions

View File

@ -56,15 +56,6 @@ impl Handle {
} }
} }
pub fn update_systray() -> Result<()> {
let app_handle = Self::global().app_handle.lock().clone();
if app_handle.is_none() {
bail!("update_systray unhandled error");
}
Tray::update_systray(app_handle.as_ref().unwrap())?;
Ok(())
}
/// update the system tray state /// update the system tray state
pub fn update_systray_part() -> Result<()> { pub fn update_systray_part() -> Result<()> {
let app_handle = Self::global().app_handle.lock().clone(); let app_handle = Self::global().app_handle.lock().clone();

View File

@ -239,9 +239,8 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
hotkey::Hotkey::global().update(hotkeys)?; hotkey::Hotkey::global().update(hotkeys)?;
} }
if language.is_some() { if language.is_some()
handle::Handle::update_systray()?; || system_proxy.is_some()
} else if system_proxy.is_some()
|| tun_mode.is_some() || tun_mode.is_some()
|| common_tray_icon.is_some() || common_tray_icon.is_some()
|| sysproxy_tray_icon.is_some() || sysproxy_tray_icon.is_some()