mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:43:44 +08:00
chore: update
This commit is contained in:
parent
0b44d40b39
commit
b9a220cb63
@ -203,6 +203,8 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
|||||||
let mut should_update_launch = false;
|
let mut should_update_launch = false;
|
||||||
let mut should_update_sysproxy = false;
|
let mut should_update_sysproxy = false;
|
||||||
let mut should_update_systray_icon = false;
|
let mut should_update_systray_icon = false;
|
||||||
|
let mut should_update_hotkey = false;
|
||||||
|
let mut should_update_systray_menu = false;
|
||||||
|
|
||||||
if tun_mode.is_some() {
|
if tun_mode.is_some() {
|
||||||
should_update_clash_config = true;
|
should_update_clash_config = true;
|
||||||
@ -247,6 +249,12 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
|||||||
{
|
{
|
||||||
should_update_systray_icon = true;
|
should_update_systray_icon = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if patch.hotkeys.is_some() {
|
||||||
|
should_update_hotkey = true;
|
||||||
|
should_update_systray_menu = true;
|
||||||
|
}
|
||||||
|
|
||||||
if should_restart_core {
|
if should_restart_core {
|
||||||
CoreManager::global().restart_core().await?;
|
CoreManager::global().restart_core().await?;
|
||||||
}
|
}
|
||||||
@ -262,8 +270,11 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
|||||||
sysopt::Sysopt::global().update_sysproxy().await?;
|
sysopt::Sysopt::global().update_sysproxy().await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(hotkeys) = patch.hotkeys {
|
if should_update_hotkey {
|
||||||
hotkey::Hotkey::global().update(hotkeys)?;
|
hotkey::Hotkey::global().update(patch.hotkeys.unwrap())?;
|
||||||
|
}
|
||||||
|
|
||||||
|
if should_update_systray_menu {
|
||||||
tray::Tray::global().update_menu()?;
|
tray::Tray::global().update_menu()?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user