From a8f4b318c18c067e9d63edfc2d87f7bf9745c5e5 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Wed, 11 Aug 2021 14:59:21 +0300 Subject: [PATCH] Fix tice vibration after cancelling the voice record. --- .../home/room/detail/composer/VoiceMessageRecorderView.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt index 96a066b295e..47e72b46f77 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt @@ -219,6 +219,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor( } RecordingState.CANCELLED -> { hideRecordingViews(isCancelled = true) + vibrate(context) } RecordingState.LOCKED -> { if (isRecordingStateChanged) { // Do not update views if it was already in locked state. @@ -428,10 +429,6 @@ class VoiceMessageRecorderView @JvmOverloads constructor( if (recordingState == RecordingState.CANCELLED || recordingState == RecordingState.NONE) { hideToast() } - - if (isCancelled.orFalse()) { - vibrate(context) - } } private fun resetMicButtonUi() {