From cfe64eed2a371d0524e2156d6399b2114f08b02f Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Fri, 30 Jul 2021 11:27:14 +0300 Subject: [PATCH] Update initial recording state to restore from background. --- .../home/room/detail/composer/VoiceMessageRecorderView.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt index 33a1c955dd..ba6e0fbae7 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt @@ -88,6 +88,8 @@ class VoiceMessageRecorderView @JvmOverloads constructor( } fun initVoiceRecordingViews() { + recordingState = RecordingState.NONE + hideRecordingViews(null) stopRecordingTicker() @@ -327,9 +329,6 @@ class VoiceMessageRecorderView @JvmOverloads constructor( private fun renderRecordingWaveform(amplitudeList: List) { views.voicePlaybackWaveform.apply { post { - // TODO We could avoid recreating the whole view here and just call update() with the new value(s). - // Currently it is broken if a configuration change occurs. - recreate() amplitudeList.forEach { amplitude -> update(amplitude) }