Skip to main content

show_as_recording

Function show_as_recording 

Source
const fn show_as_recording(
    stop_requested: bool,
    backend_recording: bool,
) -> bool
Expand description

Whether the recorder controls should render the “recording” state (the RECORDING pill + Stop button). True only when the backend reports an active session (backend_recording) and the user hasn’t just requested a stop (stop_requested).

The latch is what fixes the post-stop “stuck” bug: the 500 ms backend status pump can emit a trailing Stopping event during teardown that arrives after the stop handler reset the UI. Without the latch that event flips is_recording back to true, and since the backend session is then gone every further Stop click returns “no recording session is active” without ever resetting — the recorder is stuck until relaunch.