From c2b217047851ef46f0e9283211728798f7d26e62 Mon Sep 17 00:00:00 2001 From: GuavaGoat <320862384+GuavaGoat@users.noreply.github.com> Date: Sat, 29 Aug 2026 06:26:16 +0000 Subject: [PATCH] Update ActiveCallView.swift show reconnecting to ui without sending to core --- apps/ios/Shared/Views/Call/ActiveCallView.swift | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/ios/Shared/Views/Call/ActiveCallView.swift b/apps/ios/Shared/Views/Call/ActiveCallView.swift index 2478b30fd9..22fa6cdff3 100644 --- a/apps/ios/Shared/Views/Call/ActiveCallView.swift +++ b/apps/ios/Shared/Views/Call/ActiveCallView.swift @@ -185,8 +185,9 @@ struct ActiveCallView: View { CallSoundsPlayer.shared.vibrate(long: false) wasConnected = true } - } else if let callStatus = WebRTCCallStatus.init(rawValue: state.connectionState), - case .reconnecting = callStatus { + } else if state.connectionState == "reconnecting" { + // call is restored and not sent to the core, this is shown only to the ui + // make sure core records correct duration despite reconnection state call.callState = .reconnecting } if state.connectionState == "closed" { @@ -197,11 +198,13 @@ struct ActiveCallView: View { m.activeCall = nil m.activeCallViewIsCollapsed = false } - Task { - do { - try await apiCallStatus(call.contact, state.connectionState) - } catch { - logger.error("apiCallStatus \(responseError(error))") + if state.connectionState != "reconnecting" { + Task { + do { + try await apiCallStatus(call.contact, state.connectionState) + } catch { + logger.error("apiCallStatus \(responseError(error))") + } } } case let .connected(connectionInfo):