mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
refactor: when updating the tray, the logic is split to improve performance.
This commit is contained in:
@@ -71,6 +71,21 @@ impl Handle {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn update_systray_menu() -> Result<()> {
|
||||
Tray::update_menu()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn update_systray_icon() -> Result<()> {
|
||||
Tray::update_icon()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn update_systray_tooltip() -> Result<()> {
|
||||
Tray::update_tooltip()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_is_exiting(&self) {
|
||||
let mut is_exiting = self.is_exiting.write();
|
||||
*is_exiting = true;
|
||||
|
||||
Reference in New Issue
Block a user