A11Y: ensure a11y focus is not lost and reset to the back button when the user start playing a pending voice message.
This commit is contained in:
parent
8a290c339d
commit
5034ae06b8
1 changed files with 5 additions and 17 deletions
|
|
@ -67,22 +67,12 @@ internal fun VoiceMessagePreview(
|
|||
.heightIn(26.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
if (isPlaying) {
|
||||
PlayerButton(
|
||||
type = PlayerButtonType.Pause,
|
||||
onClick = onPauseClick,
|
||||
enabled = isInteractive,
|
||||
)
|
||||
} else {
|
||||
PlayerButton(
|
||||
type = PlayerButtonType.Play,
|
||||
onClick = onPlayClick,
|
||||
enabled = isInteractive
|
||||
)
|
||||
}
|
||||
|
||||
PlayerButton(
|
||||
type = if (isPlaying) PlayerButtonType.Pause else PlayerButtonType.Play,
|
||||
onClick = if (isPlaying) onPauseClick else onPlayClick,
|
||||
enabled = isInteractive,
|
||||
)
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
|
||||
Text(
|
||||
text = time.formatShort(),
|
||||
color = ElementTheme.colors.textSecondary,
|
||||
|
|
@ -90,9 +80,7 @@ internal fun VoiceMessagePreview(
|
|||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.width(12.dp))
|
||||
|
||||
WaveformPlaybackView(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue