fix(tray): use an app-specific tray id (#1978)

Co-authored-by: liyang <liyang25@pku.edu.cn>
This commit is contained in:
Li Yang
2026-04-21 10:42:59 +08:00
committed by GitHub
parent 2c9252dec5
commit 61bfc29d82
4 changed files with 19 additions and 7 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ pub async fn set_auto_failover_enabled(
// 刷新托盘菜单,确保状态同步
if let Ok(new_menu) = crate::tray::create_tray_menu(&app, &state) {
if let Some(tray) = app.tray_by_id("main") {
if let Some(tray) = app.tray_by_id(crate::tray::TRAY_ID) {
let _ = tray.set_menu(Some(new_menu));
}
}