Detail playback row: drop the redundant Pause/Resume pill and the duplicate Stop text button — one filled Stop button, always present while playing

This commit is contained in:
avi 2026-09-18 08:33:43 -05:00
commit bcb32e4f01

View file

@ -636,17 +636,14 @@ fun DetailScreen(state: DesktopState) {
Row(verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp)) {
if (isPlaying) {
if (transport) {
OutlinedButton({ state.setPaused(!ps.paused) }) {
Text(if (ps.paused) "Resume" else "Pause")
}
} else {
Button({ state.stopPlayback() }) {
Icon(Icons.Filled.Stop, contentDescription = null,
modifier = Modifier.size(18.dp))
Spacer(Modifier.width(6.dp))
Text("Stop")
}
// One Stop control, always present (the pause/resume pill
// was redundant: Stop already ends playback, and the
// separate Stop text button duplicated it).
Button({ state.stopPlayback() }) {
Icon(Icons.Filled.Stop, contentDescription = null,
modifier = Modifier.size(18.dp))
Spacer(Modifier.width(6.dp))
Text("Stop")
}
if (transport && ps.durationSec > 0) {
val dur = ps.durationSec
@ -663,7 +660,6 @@ fun DetailScreen(state: DesktopState) {
color = MaterialTheme.colorScheme.primary)
Spacer(Modifier.weight(1f))
}
TextButton({ state.stopPlayback() }) { Text("Stop") }
} else {
OutlinedButton({ state.playFrom(detail.file) }) {
Icon(Icons.Filled.PlayArrow, contentDescription = null,