mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
Update initial recording state to restore from background.
This commit is contained in:
parent
e945b8911c
commit
cfe64eed2a
1 changed files with 2 additions and 3 deletions
|
@ -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 a new issue