mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:33:45 +08:00
fix: windows tray icon color not updated
This commit is contained in:
parent
5057221f59
commit
3d84acd7ac
@ -77,7 +77,6 @@ pub fn change_clash_mode(mode: String) {
|
|||||||
if Config::clash().data().save_config().is_ok() {
|
if Config::clash().data().save_config().is_ok() {
|
||||||
handle::Handle::refresh_clash();
|
handle::Handle::refresh_clash();
|
||||||
log_err!(tray::Tray::global().update_menu());
|
log_err!(tray::Tray::global().update_menu());
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
log_err!(tray::Tray::global().update_icon(None));
|
log_err!(tray::Tray::global().update_icon(None));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -142,7 +141,6 @@ pub async fn patch_clash(patch: Mapping) -> Result<()> {
|
|||||||
} else {
|
} else {
|
||||||
if patch.get("mode").is_some() {
|
if patch.get("mode").is_some() {
|
||||||
log_err!(tray::Tray::global().update_menu());
|
log_err!(tray::Tray::global().update_menu());
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
log_err!(tray::Tray::global().update_icon(None));
|
log_err!(tray::Tray::global().update_icon(None));
|
||||||
}
|
}
|
||||||
Config::runtime().latest().patch_config(patch);
|
Config::runtime().latest().patch_config(patch);
|
||||||
@ -211,11 +209,8 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
|||||||
should_update_clash_config = true;
|
should_update_clash_config = true;
|
||||||
should_update_systray_menu = true;
|
should_update_systray_menu = true;
|
||||||
should_update_systray_tooltip = true;
|
should_update_systray_tooltip = true;
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
{
|
|
||||||
should_update_systray_icon = true;
|
should_update_systray_icon = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
if redir_enabled.is_some() || redir_port.is_some() {
|
if redir_enabled.is_some() || redir_port.is_some() {
|
||||||
@ -242,11 +237,8 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
|||||||
should_update_sysproxy = true;
|
should_update_sysproxy = true;
|
||||||
should_update_systray_menu = true;
|
should_update_systray_menu = true;
|
||||||
should_update_systray_tooltip = true;
|
should_update_systray_tooltip = true;
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
{
|
|
||||||
should_update_systray_icon = true;
|
should_update_systray_icon = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if proxy_bypass.is_some() || pac_content.is_some() || pac.is_some() {
|
if proxy_bypass.is_some() || pac_content.is_some() || pac.is_some() {
|
||||||
should_update_sysproxy = true;
|
should_update_sysproxy = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user