diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/voice/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/voice/VoiceMessageRecorderView.kt index 178e814550..c673ecfc16 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/voice/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/voice/VoiceMessageRecorderView.kt @@ -131,7 +131,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor( } RecordingUiState.Cancelled -> { stopRecordingTicker() - voiceMessageViews.hideRecordingViews(recordingState) { callback.onDeleteVoiceMessage() } + voiceMessageViews.hideRecordingViews(recordingState) vibrate(context) } RecordingUiState.Locked -> { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/voice/VoiceMessageViews.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/voice/VoiceMessageViews.kt index 16a12aae35..7aeb665486 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/voice/VoiceMessageViews.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/voice/VoiceMessageViews.kt @@ -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.