removing no longer needed message delete on animation end, we delete the file straight away
This commit is contained in:
parent
1afc1b51e5
commit
7d262ebc32
|
@ -131,7 +131,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
|
|||
}
|
||||
RecordingUiState.Cancelled -> {
|
||||
stopRecordingTicker()
|
||||
voiceMessageViews.hideRecordingViews(recordingState) { callback.onDeleteVoiceMessage() }
|
||||
voiceMessageViews.hideRecordingViews(recordingState)
|
||||
vibrate(context)
|
||||
}
|
||||
RecordingUiState.Locked -> {
|
||||
|
|
|
@ -151,7 +151,7 @@ class VoiceMessageViews(
|
|||
views.voiceMessageSendButton.isVisible = false
|
||||
}
|
||||
|
||||
fun hideRecordingViews(recordingState: RecordingUiState, onVoiceRecordingEnded: () -> Unit = {}) {
|
||||
fun hideRecordingViews(recordingState: RecordingUiState) {
|
||||
// We need to animate the lock image first
|
||||
if (recordingState != RecordingUiState.Locked) {
|
||||
views.voiceMessageLockImage.isVisible = false
|
||||
|
@ -180,7 +180,6 @@ class VoiceMessageViews(
|
|||
.setDuration(150)
|
||||
.withEndAction {
|
||||
resetMicButtonUi()
|
||||
onVoiceRecordingEnded()
|
||||
}
|
||||
.start()
|
||||
} else {
|
||||
|
@ -192,7 +191,6 @@ class VoiceMessageViews(
|
|||
translationX = 0f
|
||||
translationY = 0f
|
||||
}
|
||||
onVoiceRecordingEnded()
|
||||
}
|
||||
|
||||
// Hide toasts if user cancelled recording before the timeout of the toast.
|
||||
|
|
Loading…
Reference in New Issue