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:
parent
5d1f615d4a
commit
bcb32e4f01
1 changed files with 8 additions and 12 deletions
|
|
@ -636,18 +636,15 @@ 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 {
|
||||
// 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
|
||||
Slider(
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue