From 607124079f5f88d59a4d5de1c0930159de681f18 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:05:33 +0000 Subject: [PATCH] desktop: fix voice message recording not stopping on chat switch (#6849) --- .../kotlin/chat/simplex/common/views/chat/ComposeView.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt index 62cfdcbe65..95f51bf284 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt @@ -1304,6 +1304,8 @@ fun ComposeView( composeState.value = cs.copy(inProgress = false, progressByTimeout = false) } else if (!cs.empty) { if (cs.preview is ComposePreview.VoicePreview && !cs.preview.finished) { + recState.value = RecordingState.NotStarted + RecorderInterface.stopRecording?.invoke() composeState.value = cs.copy(preview = cs.preview.copy(finished = true)) } if (saveLastDraft) {