mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
Fix: Custom tray icon not working
1. Contains potential deadlock
This commit is contained in:
@@ -57,7 +57,7 @@ impl Handle {
|
||||
}
|
||||
|
||||
pub fn update_systray() -> Result<()> {
|
||||
let app_handle = Self::global().app_handle.lock();
|
||||
let app_handle = Self::global().app_handle.lock().clone();
|
||||
if app_handle.is_none() {
|
||||
bail!("update_systray unhandled error");
|
||||
}
|
||||
@@ -67,7 +67,7 @@ impl Handle {
|
||||
|
||||
/// update the system tray state
|
||||
pub fn update_systray_part() -> Result<()> {
|
||||
let app_handle = Self::global().app_handle.lock();
|
||||
let app_handle = Self::global().app_handle.lock().clone();
|
||||
if app_handle.is_none() {
|
||||
bail!("update_systray unhandled error");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user