We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcdfcc3 commit 5bdceb9Copy full SHA for 5bdceb9
1 file changed
app/src/main/java/com/nextcloud/talk/ui/chat/VoiceMessage.kt
@@ -68,7 +68,11 @@ fun VoiceMessage(
68
val remainingSeconds = (typeContent.durationSeconds - typeContent.playedSeconds).coerceAtLeast(0)
69
val waveformData = remember(typeContent.waveform) {
70
val floatArr = typeContent.waveform.toFloatArray()
71
- AudioUtils.shrinkFloatArray(floatArr, WAVEFORM_SIZE)
+ if (floatArr.size < WAVEFORM_SIZE) {
72
+ FloatArray(WAVEFORM_SIZE)
73
+ } else {
74
+ AudioUtils.shrinkFloatArray(floatArr, WAVEFORM_SIZE)
75
+ }
76
}
77
78
Column {
@@ -99,7 +103,6 @@ fun VoiceMessage(
99
103
{
100
104
val progressI = (it * SEEKBAR_MAX).toInt()
101
105
onSeek(message.id, progressI)
102
- sliderValue = it
106
},
107
modifier = Modifier
108
.height(56.dp)
0 commit comments