mirror of
https://github.com/element-hq/element-android
synced 2024-11-25 02:45:37 +03:00
removing no longer needed message delete on animation end, we delete the file straight away
This commit is contained in:
parent
1afc1b51e5
commit
7d262ebc32
2 changed files with 2 additions and 4 deletions
|
@ -131,7 +131,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
|
||||||
}
|
}
|
||||||
RecordingUiState.Cancelled -> {
|
RecordingUiState.Cancelled -> {
|
||||||
stopRecordingTicker()
|
stopRecordingTicker()
|
||||||
voiceMessageViews.hideRecordingViews(recordingState) { callback.onDeleteVoiceMessage() }
|
voiceMessageViews.hideRecordingViews(recordingState)
|
||||||
vibrate(context)
|
vibrate(context)
|
||||||
}
|
}
|
||||||
RecordingUiState.Locked -> {
|
RecordingUiState.Locked -> {
|
||||||
|
|
|
@ -151,7 +151,7 @@ class VoiceMessageViews(
|
||||||
views.voiceMessageSendButton.isVisible = false
|
views.voiceMessageSendButton.isVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
fun hideRecordingViews(recordingState: RecordingUiState, onVoiceRecordingEnded: () -> Unit = {}) {
|
fun hideRecordingViews(recordingState: RecordingUiState) {
|
||||||
// We need to animate the lock image first
|
// We need to animate the lock image first
|
||||||
if (recordingState != RecordingUiState.Locked) {
|
if (recordingState != RecordingUiState.Locked) {
|
||||||
views.voiceMessageLockImage.isVisible = false
|
views.voiceMessageLockImage.isVisible = false
|
||||||
|
@ -180,7 +180,6 @@ class VoiceMessageViews(
|
||||||
.setDuration(150)
|
.setDuration(150)
|
||||||
.withEndAction {
|
.withEndAction {
|
||||||
resetMicButtonUi()
|
resetMicButtonUi()
|
||||||
onVoiceRecordingEnded()
|
|
||||||
}
|
}
|
||||||
.start()
|
.start()
|
||||||
} else {
|
} else {
|
||||||
|
@ -192,7 +191,6 @@ class VoiceMessageViews(
|
||||||
translationX = 0f
|
translationX = 0f
|
||||||
translationY = 0f
|
translationY = 0f
|
||||||
}
|
}
|
||||||
onVoiceRecordingEnded()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide toasts if user cancelled recording before the timeout of the toast.
|
// Hide toasts if user cancelled recording before the timeout of the toast.
|
||||||
|
|
Loading…
Reference in a new issue