Update initial recording state to restore from background.
This commit is contained in:
parent
e945b8911c
commit
cfe64eed2a
|
@ -88,6 +88,8 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun initVoiceRecordingViews() {
|
fun initVoiceRecordingViews() {
|
||||||
|
recordingState = RecordingState.NONE
|
||||||
|
|
||||||
hideRecordingViews(null)
|
hideRecordingViews(null)
|
||||||
stopRecordingTicker()
|
stopRecordingTicker()
|
||||||
|
|
||||||
|
@ -327,9 +329,6 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
|
||||||
private fun renderRecordingWaveform(amplitudeList: List<Int>) {
|
private fun renderRecordingWaveform(amplitudeList: List<Int>) {
|
||||||
views.voicePlaybackWaveform.apply {
|
views.voicePlaybackWaveform.apply {
|
||||||
post {
|
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 ->
|
amplitudeList.forEach { amplitude ->
|
||||||
update(amplitude)
|
update(amplitude)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue