diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx index 09cca63ef..9f0a1b3af 100644 --- a/src/components/launch/LaunchWindow.tsx +++ b/src/components/launch/LaunchWindow.tsx @@ -83,6 +83,7 @@ function LaunchWindowContent() { const { elapsed, formatTime } = useRecordingTimer(recording, paused); const hudContentRef = useRef(null); const hudBarRef = useRef(null); + const pendingAutoStartRef = useRef(false); const { selectedSource, @@ -162,6 +163,12 @@ function LaunchWindowContent() { }; }, []); + useEffect(() => { + if (openId !== "sources") { + pendingAutoStartRef.current = false; + } + }, [openId]); + const { recordingHudOffset, isHudDragging, @@ -226,7 +233,13 @@ function LaunchWindowContent() { <> { + await handleSourceSelect(source); + if (pendingAutoStartRef.current) { + pendingAutoStartRef.current = false; + void toggleRecording(); + } + }} onOpen={beginInteractiveHudAction} trigger={