Fix: Custom tray icon not working

1. Contains potential deadlock
This commit is contained in:
huzibaca
2024-09-20 16:26:23 +08:00
parent 414f9e9e96
commit dffd663d7a
6 changed files with 19 additions and 18 deletions

View File

@@ -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");
}