From 2fb2a42e451c5e838800679e4132a66d8fc334f6 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO <> Date: Tue, 1 Apr 2025 10:10:53 +1100 Subject: [PATCH] move call connection strings out of Constants file --- .../Calls/Call Management/SessionCall.swift | 23 +++++++++++++++++-- SessionUtilitiesKit/General/Constants.swift | 17 -------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Session/Calls/Call Management/SessionCall.swift b/Session/Calls/Call Management/SessionCall.swift index 51f6fa4e6..c10cd1a19 100644 --- a/Session/Calls/Call Management/SessionCall.swift +++ b/Session/Calls/Call Management/SessionCall.swift @@ -529,7 +529,26 @@ public final class SessionCall: CurrentCallProtocol, WebRTCSessionDelegate { // MARK: - Connection Steps +// TODO: Remove these when calls are out of beta extension SessionCall { + // stringlint:ignore_contents + public static let call_connection_steps_sender: [String] = [ + "Creating Call 1/6", + "Sending Call Offer 2/6", + "Sending Connection Candidates 3/6", + "Awaiting Recipient Answer... 4/6", + "Handling Connection Candidates 5/6", + "Call Connected 6/6", + ] + // stringlint:ignore_contents + public static let call_connection_steps_receiver: [String] = [ + "Received Call Offer 1/5", + "Answering Call 2/5", + "Sending Connection Candidates 3/5", + "Handling Connection Candidates 4/5", + "Call Connected 5/5", + ] + public protocol ConnectionStep { var index: Int { get } var nextStep: ConnectionStep? { get } @@ -601,8 +620,8 @@ extension SessionCall { DispatchQueue.main.async { self.updateCallDetailedStatus?( self.mode == .offer ? - Constants.call_connection_steps_sender[self.currentConnectionStep.index] : - Constants.call_connection_steps_receiver[self.currentConnectionStep.index] + SessionCall.call_connection_steps_sender[self.currentConnectionStep.index] : + SessionCall.call_connection_steps_receiver[self.currentConnectionStep.index] ) } diff --git a/SessionUtilitiesKit/General/Constants.swift b/SessionUtilitiesKit/General/Constants.swift index 55d71d402..11d74cd41 100644 --- a/SessionUtilitiesKit/General/Constants.swift +++ b/SessionUtilitiesKit/General/Constants.swift @@ -8,22 +8,5 @@ public enum Constants { public static let session_download_url: String = "https://getsession.org/download" public static let gif: String = "GIF" public static let oxen_foundation: String = "Oxen Foundation" - - // TODO: Remove these when calls are out of beta - public static let call_connection_steps_sender: [String] = [ - "Creating Call 1/6", - "Sending Call Offer 2/6", - "Sending Connection Candidates 3/6", - "Awaiting Recipient Answer... 4/6", - "Handling Connection Candidates 5/6", - "Call Connected 6/6", - ] - public static let call_connection_steps_receiver: [String] = [ - "Received Call Offer 1/5", - "Answering Call 2/5", - "Sending Connection Candidates 3/5", - "Handling Connection Candidates 4/5", - "Call Connected 5/5", - ] }