mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
fix(tray): second-instance restore stays generic over Runtime (#1298)
This commit is contained in:
@@ -157,6 +157,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## Fixed
|
||||
|
||||
### Tray — release build compile after #1296
|
||||
|
||||
**By [@cucadmuh](https://github.com/cucadmuh), PR [#1298](https://github.com/Psychotoxical/psysonic/pull/1298)**
|
||||
|
||||
* Fixes `E0308` in release `on_second_instance`: second-launch tray restore again uses inline resume/show/unminimize/focus so it stays generic over `tauri::Runtime` (Nix/release builds no longer fail on `restore_main_window(&WebviewWindow<R>)`).
|
||||
|
||||
### Tray — sidebar missing after cold start minimized to tray
|
||||
|
||||
**By [@cucadmuh](https://github.com/cucadmuh), PR [#1296](https://github.com/Psychotoxical/psysonic/pull/1296)**
|
||||
|
||||
@@ -53,11 +53,14 @@ fn on_second_instance<R: tauri::Runtime>(
|
||||
let window = app.get_webview_window("main").expect("no main window");
|
||||
// The window may have been hidden via the close-to-tray path,
|
||||
// which injects PAUSE_RENDERING_JS (sets `__psyHidden=true`,
|
||||
// pauses CSS animations). Tray restore uses `restore_main_window`
|
||||
// — second-launch restore must do the same, otherwise the webview
|
||||
// comes back with rendering still paused and navigation looks blank
|
||||
// (issue #497).
|
||||
let _ = crate::lib_commands::ui::mini::restore_main_window(&window);
|
||||
// pauses CSS animations). Tray-icon restore mirrors this with
|
||||
// RESUME_RENDERING_JS — second-launch restore must do the same,
|
||||
// otherwise the webview comes back with rendering still paused
|
||||
// and navigation looks blank (issue #497).
|
||||
let _ = window.eval(RESUME_RENDERING_JS);
|
||||
let _ = window.show();
|
||||
let _ = window.unminimize();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user