Bring back the tuner-release and connecting-label Radio fixes

Restore the two fixes the previous commit moved out:

- A tuner release onto a station the directory dropped mid-drag stops the
  stream the drag paused, publishing one state with the gesture's origin,
  so the button reads PLAY and a voice handoff is cancelled.
- The transport buttons offer Pause while a stream connects, matching
  what a click does.

Their tests now use the shared Radio layer harness.
This commit is contained in:
German Khokhlov committed 2026-10-30 16:44:15 +04:00
1 parent a55450e2e7
commit 5ed86200e5
5 files changed
+81 -4

No files matched your search

+4 -1
View File
@@ -179,7 +179,10 @@ export function createTuning({ state: layerState, services, parts, source }) {
layerState._selectionGeneration += 1;
parts.tuningNoise.clearRadioTuningNoise({ emit: false });
layerState._tuningUnavailableStationId = stationId;
parts.presentation.emitState();
// The drag paused the previous stream; with no selection left, Resume
// could only start the nearest station, so release it. Stop publishes
// the state, and as the user's gesture it cancels a voice handoff.
parts.playback.stopRadioPlayback({ origin });
return Object.freeze({
ok: false,
reason: 'station-unavailable',