mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-29 19:28:58 +03:00
Fix possible crash rendering playback time
https://github.com/SchildiChat/SchildiChat-android-rageshakes/issues/1087 Change-Id: I688e93637a0b0c42907b980cb619f5cb6c991c50
This commit is contained in:
parent
1bc97e0aba
commit
f605667a97
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ abstract class MessageAudioItem : AbsMessageItem<MessageAudioItem.Holder>() {
|
|||
|
||||
private fun getPlaybackTimeContentDescription(context: Context, time: Int): String {
|
||||
val formattedPlaybackTime = formatPlaybackTime(time)
|
||||
val (minutes, seconds) = formattedPlaybackTime.split(":").map { it.toIntOrNull() ?: 0 }
|
||||
val (minutes, seconds) = formattedPlaybackTime.split(":").map { it.toIntOrNull() ?: 0 }.let { if (it.size > 1) it else listOf(0) + it }
|
||||
return context.getString(R.string.a11y_audio_playback_duration, minutes, seconds)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue