diff --git a/apps/multiplatform/common/src/androidMain/kotlin/chat/simplex/common/views/call/CallView.android.kt b/apps/multiplatform/common/src/androidMain/kotlin/chat/simplex/common/views/call/CallView.android.kt index e3480ae827..c73f31deb9 100644 --- a/apps/multiplatform/common/src/androidMain/kotlin/chat/simplex/common/views/call/CallView.android.kt +++ b/apps/multiplatform/common/src/androidMain/kotlin/chat/simplex/common/views/call/CallView.android.kt @@ -174,10 +174,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) + } updateActiveCall(call) { it.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 updateActiveCall(call) { it.copy(callState = CallState.Connected, connectedAt = it.connectedAt ?: Clock.System.now()) } }