From 5114af0291737fd727bf77dd03250056e183d38f Mon Sep 17 00:00:00 2001 From: GuavaGoat <320862384+GuavaGoat@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:14:19 +0000 Subject: [PATCH] Update CallView.desktop.kt add reconnecting sound on reconnect --- .../chat/simplex/common/views/call/CallView.desktop.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/multiplatform/common/src/desktopMain/kotlin/chat/simplex/common/views/call/CallView.desktop.kt b/apps/multiplatform/common/src/desktopMain/kotlin/chat/simplex/common/views/call/CallView.desktop.kt index a87892717c..5259e0f7a8 100644 --- a/apps/multiplatform/common/src/desktopMain/kotlin/chat/simplex/common/views/call/CallView.desktop.kt +++ b/apps/multiplatform/common/src/desktopMain/kotlin/chat/simplex/common/views/call/CallView.desktop.kt @@ -60,10 +60,16 @@ actual fun ActiveCallView() { // the call is restored and NOT sent to the core // Makes sure the core DOES NOT record the duration wrong if a reconnect happens if (r.state.connectionState == "reconnecting") { + if (call.callState != CallState.Reconnecting) { + CallSoundsPlayer.startConnectingCallSound(scope) + } chatModel.activeCall.value = call.copy(callState = CallState.Reconnecting) } else try { val callStatus = json.decodeFromString("\"${r.state.connectionState}\"") if (callStatus == WebRTCCallStatus.Connected) { + if (call.callState == CallState.Reconnecting) { + CallSoundsPlayer.stop() + } // connectedAt is only set ONCE, this way call duration is NOT reset when the call is restored from reconnecting chatModel.activeCall.value = call.copy(callState = CallState.Connected, connectedAt = call.connectedAt ?: Clock.System.now()) }