fix(windows): merge taskbar icon (AUMID) + focus window on notification click
Taskbar showed two icons because the AppUserModelID was (a) set too late — after the main window was built, so its taskbar button grouped under a mismatched implicit AUMID — and (b) valued 'LotusGuild.LotusChat', which differs from the bundle identifier 'org.lotusguild.lotus-chat' that Tauri's NSIS installer stamps on its shortcuts. Fix both: set the AUMID at the top of run() before the window is built (new set_process_aumid, split out of ensure_app_user_model_id), and align the constant to the bundle identifier so the running window and a pinned installer shortcut group together. Notification click didn't raise the window: add a focus_main_window command (reuses show_main) for the web/service-worker path, and call show_main directly in the rich-toast Activated body-click handler. Note: existing users who pinned the old mis-grouped icon may need to re-pin once. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -186,7 +186,13 @@ fn show_windows_toast(
|
||||
.to_string();
|
||||
super::emit_to_web(&app_activated, "lotus-notification-reply", &payload);
|
||||
} else {
|
||||
// Plain body click: forward the launch path so the web routes to it.
|
||||
// Plain body click: raise the window to the foreground (the
|
||||
// "foreground" activationType is unreliable for an unpackaged app,
|
||||
// so do it explicitly), then forward the launch path so the web
|
||||
// routes to the room. `show_main` is the shared tray/deep-link
|
||||
// helper. Not done for the reply branch — an inline quick-reply
|
||||
// shouldn't yank the window forward.
|
||||
crate::show_main(&app_activated);
|
||||
let payload = serde_json::json!({
|
||||
"path": path_owned.as_deref(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user