Skip to content

Commit 8bd34ed

Browse files
committed
Gallery: Voice message: render duration when the playback is not started.
1 parent 16b348a commit 8bd34ed

File tree

1 file changed

+1
-1
lines changed
  • libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/ui

1 file changed

+1
-1
lines changed

libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/ui/VoiceItemView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private fun VoiceInfoRow(
117117
}
118118
Spacer(Modifier.width(8.dp))
119119
Text(
120-
text = state.time,
120+
text = if (state.progress > 0f) state.time else voice.duration ?: state.time,
121121
color = ElementTheme.colors.textSecondary,
122122
style = ElementTheme.typography.fontBodyMdMedium,
123123
maxLines = 1,

0 commit comments

Comments
 (0)