Skip to content

Commit a5448f3

Browse files
committed
[Fix]Swift format
1 parent 75dd7de commit a5448f3

File tree

62 files changed

+178
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+178
-177
lines changed

.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
--rules redundantRawValues
3535
--rules redundantVoidReturnType
3636
--rules semicolons
37-
--rules sortImports
37+
--rules sortedImports
3838
--rules spaceAroundBraces
3939
--rules spaceAroundBrackets
4040
--rules spaceAroundComments

DemoApp/Sources/Components/DemoAppViewFactory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ final class DemoAppViewFactory: ViewFactory {
8888
func makeVideoParticipantsView(
8989
viewModel: CallViewModel,
9090
availableFrame: CGRect,
91-
onChangeTrackVisibility: @escaping @MainActor (CallParticipant, Bool) -> Void
91+
onChangeTrackVisibility: @escaping @MainActor(CallParticipant, Bool) -> Void
9292
) -> some View {
9393
VideoParticipantsView(
9494
viewFactory: self,

DocumentationTests/DocumentationTests/DocumentationTests/03-guides/10-view-slots.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private func content() {
8888
public func makeVideoParticipantsView(
8989
viewModel: CallViewModel,
9090
availableFrame: CGRect,
91-
onChangeTrackVisibility: @escaping @MainActor (CallParticipant, Bool) -> Void
91+
onChangeTrackVisibility: @escaping @MainActor(CallParticipant, Bool) -> Void
9292
) -> some View {
9393
VideoParticipantsView(
9494
viewFactory: self,

DocumentationTests/DocumentationTests/DocumentationTests/04-ui-components/07-call/04-active-call.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private func content() {
4343
public func makeVideoParticipantsView(
4444
viewModel: CallViewModel,
4545
availableFrame: CGRect,
46-
onChangeTrackVisibility: @escaping @MainActor (CallParticipant, Bool) -> Void
46+
onChangeTrackVisibility: @escaping @MainActor(CallParticipant, Bool) -> Void
4747
) -> some View {
4848
VideoParticipantsView(
4949
viewFactory: self,

DocumentationTests/DocumentationTests/DocumentationTests/04-ui-components/08-participants/02-call-participants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private func content() {
2424
public func makeVideoParticipantsView(
2525
viewModel: CallViewModel,
2626
availableFrame: CGRect,
27-
onChangeTrackVisibility: @escaping @MainActor (CallParticipant, Bool) -> Void
27+
onChangeTrackVisibility: @escaping @MainActor(CallParticipant, Bool) -> Void
2828
) -> some View {
2929
CustomVideoParticipantsView(
3030
viewFactory: self,

DocumentationTests/DocumentationTests/DocumentationTests/05-ui-cookbook/16-snapshot.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private func content() {
6868
func makeVideoParticipantsView(
6969
viewModel: CallViewModel,
7070
availableFrame: CGRect,
71-
onChangeTrackVisibility: @escaping @MainActor (CallParticipant, Bool) -> Void
71+
onChangeTrackVisibility: @escaping @MainActor(CallParticipant, Bool) -> Void
7272
) -> some View {
7373
DefaultViewFactory.shared.makeVideoParticipantsView(
7474
viewModel: viewModel,

DocumentationTests/DocumentationTests/DocumentationTests/GloballyUsedVariables.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var contentMode = UIView.ContentMode.scaleAspectFit
4848
var id = ""
4949
var customData = [String: RawJSON]()
5050
var ratio: CGFloat = 0
51-
var onChangeTrackVisibility: @MainActor (CallParticipant, Bool) -> Void = { _, _ in }
51+
var onChangeTrackVisibility: @MainActor(CallParticipant, Bool) -> Void = { _, _ in }
5252
var orientation: UIInterfaceOrientation = .unknown
5353
var localParticipant = participant
5454
var reader: GeometryProxy!

Sources/StreamVideo/CallSettings/CallSettingsManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ protocol CallSettingsManager {
1212
newState state: Bool,
1313
current: Bool,
1414
action: (Bool) async throws -> Void,
15-
onUpdate: @Sendable (Bool) -> Void
15+
onUpdate: @Sendable(Bool) -> Void
1616
) async throws
1717
}
1818

@@ -21,7 +21,7 @@ extension CallSettingsManager {
2121
newState state: Bool,
2222
current: Bool,
2323
action: (Bool) async throws -> Void,
24-
onUpdate: @Sendable (Bool) -> Void
24+
onUpdate: @Sendable(Bool) -> Void
2525
) async throws {
2626
let updatingState = await self.state.updatingState
2727
if state == current || updatingState == state {

Sources/StreamVideo/StreamVideo.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import Foundation
77
import StreamWebRTC
88
import SwiftProtobuf
99

10-
public typealias UserTokenProvider = @Sendable (@Sendable @escaping (Result<UserToken, Error>) -> Void) -> Void
11-
public typealias UserTokenUpdater = @Sendable (UserToken) -> Void
10+
public typealias UserTokenProvider = @Sendable(@Sendable @escaping (Result<UserToken, Error>) -> Void) -> Void
11+
public typealias UserTokenUpdater = @Sendable(UserToken) -> Void
1212

1313
/// Main class for interacting with the `StreamVideo` SDK.
1414
/// Needs to be initalized with a valid api key, user and token (and token provider).

Sources/StreamVideo/StreamVideoEnvironment.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66

77
extension StreamVideo {
88
struct Environment: Sendable {
9-
var webSocketClientBuilder: @Sendable (
9+
var webSocketClientBuilder: @Sendable(
1010
_ eventNotificationCenter: EventNotificationCenter,
1111
_ url: URL
1212
) -> WebSocketClient = {
@@ -25,7 +25,7 @@ extension StreamVideo {
2525
return webSocketClient
2626
}
2727

28-
var callControllerBuilder: @Sendable (
28+
var callControllerBuilder: @Sendable(
2929
_ defaultAPI: DefaultAPI,
3030
_ user: User,
3131
_ callId: String,
@@ -45,7 +45,7 @@ extension StreamVideo {
4545
)
4646
}
4747

48-
var apiTransportBuilder: @Sendable (
48+
var apiTransportBuilder: @Sendable(
4949
_ tokenProvider: @escaping UserTokenProvider
5050
) -> DefaultAPITransport = {
5151
URLSessionTransport(
@@ -54,7 +54,7 @@ extension StreamVideo {
5454
)
5555
}
5656

57-
var connectionRecoveryHandlerBuilder: @Sendable (
57+
var connectionRecoveryHandlerBuilder: @Sendable(
5858
_ webSocketClient: WebSocketClient,
5959
_ eventNotificationCenter: EventNotificationCenter
6060
) -> ConnectionRecoveryHandler = {

0 commit comments

Comments
 (0)