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
ec43d7652b
commit
26ef425234
1 changed files with 5 additions and 17 deletions
|
|
@ -67,22 +67,12 @@ internal fun VoiceMessagePreview(
|
||||||
.heightIn(26.dp),
|
.heightIn(26.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
if (isPlaying) {
|
PlayerButton(
|
||||||
PlayerButton(
|
type = if (isPlaying) PlayerButtonType.Pause else PlayerButtonType.Play,
|
||||||
type = PlayerButtonType.Pause,
|
onClick = if (isPlaying) onPauseClick else onPlayClick,
|
||||||
onClick = onPauseClick,
|
enabled = isInteractive,
|
||||||
enabled = isInteractive,
|
)
|
||||||
)
|
|
||||||
} else {
|
|
||||||
PlayerButton(
|
|
||||||
type = PlayerButtonType.Play,
|
|
||||||
onClick = onPlayClick,
|
|
||||||
enabled = isInteractive
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = time.formatShort(),
|
text = time.formatShort(),
|
||||||
color = ElementTheme.colors.textSecondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
|
|
@ -90,9 +80,7 @@ internal fun VoiceMessagePreview(
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.width(12.dp))
|
Spacer(modifier = Modifier.width(12.dp))
|
||||||
|
|
||||||
WaveformPlaybackView(
|
WaveformPlaybackView(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue