feat #14740: start recording from the main window

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-06 12:03:46 +01:00
co-authored by Claude Sonnet 5
parent c7811b75ae
commit 57a99417d0
5 changed files with 92 additions and 6 deletions
+12 -3
View File
@@ -355,12 +355,21 @@ pub fn show_main(app: &AppHandle) {
show_and_focus(app, "main");
}
/// Brings the floating window to the front (tray "Aufnahme manuell
/// starten" while a recording runs).
pub fn show_recorder(app: &AppHandle) {
/// Brings the floating window to the front: the tray's "Aufnahme manuell
/// starten" and the main window's record button both call this instead of
/// starting a second recording when one is already running.
pub fn focus_recorder(app: &AppHandle) {
show_and_focus(app, "recorder");
}
/// Main window record button while a recording already runs: shows/focuses
/// the floating recorder window instead of starting another recording.
/// Shares [`focus_recorder`] with the tray handler.
#[tauri::command]
pub fn show_recorder(app: AppHandle) {
focus_recorder(&app);
}
fn show_and_focus(app: &AppHandle, label: &str) {
if let Some(window) = app.get_webview_window(label) {
let _ = window.unminimize();