Run SwiftFormat.

This commit is contained in:
Doug
2026-05-27 14:38:50 +01:00
committed by Doug
parent 5138e05e47
commit fa67713726
573 changed files with 2426 additions and 2426 deletions
@@ -15,7 +15,7 @@ protocol AnalyticsClientProtocol {
/// Starts the analytics client reporting data.
func start(analyticsConfiguration: AnalyticsConfiguration)
/// Reset all stored properties and any event queues on the client. Note that
/// the client will remain active, but in a fresh unidentified state.
func reset()
@@ -42,7 +42,7 @@ class AnalyticsService: AnalyticsServiceProtocol {
// The order is important here. PostHog ignores the reset if stopped.
reset()
client.stop()
MXLog.info("Stopped.")
}
@@ -50,7 +50,7 @@ class AnalyticsService: AnalyticsServiceProtocol {
guard isEnabled, !client.isRunning, let configuration = appSettings.analyticsConfiguration else { return }
client.start(analyticsConfiguration: configuration)
// Sanity check in case something went wrong.
guard client.isRunning else { return }
@@ -139,17 +139,17 @@ extension AnalyticsService {
}
capture(event: AnalyticsEvent.JoinedRoom(isDM: isDM, isSpace: isSpace, roomSize: roomSize, trigger: nil))
}
func trackPollCreated(isUndisclosed: Bool, numberOfAnswers: Int) {
capture(event: AnalyticsEvent.PollCreation(action: .Create,
isUndisclosed: isUndisclosed,
numberOfAnswers: numberOfAnswers))
}
func trackPollVote() {
capture(event: AnalyticsEvent.PollVote(doNotUse: nil))
}
func trackPollEnd() {
capture(event: AnalyticsEvent.PollEnd(doNotUse: nil))
}
@@ -185,7 +185,7 @@ extension AnalyticsService {
case .settingUp:
return
}
let event = AnalyticsEvent.CryptoSessionStateChange(recoveryState: analyticsRecoveryState, verificationState: analyticsVerificationState)
client.capture(event)
}
@@ -27,7 +27,7 @@ protocol AnalyticsServiceProtocol: AnyObject {
/// Whether analytics tracking is currently enabled.
var isEnabled: Bool { get }
/// Opts in to analytics tracking.
func optIn()
@@ -45,7 +45,7 @@ protocol AnalyticsServiceProtocol: AnyObject {
/// Resets the consent state for analytics.
func resetConsentState()
/// Track the presentation of a screen.
/// - Parameter screen: The screen that was shown.
/// - Parameter milliseconds: An optional value representing how long the screen was shown for in milliseconds.
@@ -121,11 +121,11 @@ extension AnalyticsServiceProtocol {
func track(screen: AnalyticsEvent.MobileScreen.ScreenName) {
track(screen: screen, duration: nil)
}
func trackInteraction(name: AnalyticsEvent.Interaction.Name) {
trackInteraction(index: nil, name: name)
}
@_disfavoredOverload // make sure this doesn't cause infinite recursion
func trackError(context: String?,
domain: AnalyticsEvent.Error.Domain,
@@ -146,7 +146,7 @@ extension AnalyticsServiceProtocol {
userTrustsOwnIdentity: userTrustsOwnIdentity,
wasVisibleToUser: wasVisibleToUser)
}
func trackComposer(inThread: Bool,
isEditing: Bool,
isReply: Bool,