Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Commit 0395f25

Browse files
committed
Fix code formatting
1 parent 75a4e56 commit 0395f25

2 files changed

Lines changed: 24 additions & 17 deletions

File tree

packages/ios-client/Sources/FishjamClient/pip/PictureInPictureController.swift

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class PictureInPictureController: NSObject, AVPictureInPictureControllerD
7474

7575
self.primaryPlaceholderText = primaryPlaceholder
7676
self.secondaryPlaceholderText = secondaryPlaceholder
77-
77+
7878
self.splitScreenViewModel = SplitScreenViewModel(
7979
primaryPlaceholderText: primaryPlaceholder,
8080
secondaryPlaceholderText: secondaryPlaceholder
@@ -114,29 +114,33 @@ public class PictureInPictureController: NSObject, AVPictureInPictureControllerD
114114

115115
private func setupSplitScreenLayout() {
116116
guard let pipCallViewController else { return }
117-
117+
118118
let splitScreenView = SplitScreenView(
119119
primarySampleView: primarySampleView,
120120
secondarySampleView: secondarySampleView,
121121
viewModel: splitScreenViewModel
122122
)
123-
123+
124124
splitScreenHostingController = UIHostingController(rootView: splitScreenView)
125-
125+
126126
guard let splitScreenHostingController else { return }
127-
127+
128128
splitScreenHostingController.view.translatesAutoresizingMaskIntoConstraints = false
129129
splitScreenHostingController.view.backgroundColor = .black
130-
130+
131131
pipCallViewController.addChild(splitScreenHostingController)
132132
pipCallViewController.view.addSubview(splitScreenHostingController.view)
133133
splitScreenHostingController.didMove(toParent: pipCallViewController)
134-
134+
135135
NSLayoutConstraint.activate([
136-
splitScreenHostingController.view.leadingAnchor.constraint(equalTo: pipCallViewController.view.leadingAnchor),
137-
splitScreenHostingController.view.trailingAnchor.constraint(equalTo: pipCallViewController.view.trailingAnchor),
136+
splitScreenHostingController.view.leadingAnchor.constraint(
137+
equalTo: pipCallViewController.view.leadingAnchor
138+
),
139+
splitScreenHostingController.view.trailingAnchor.constraint(
140+
equalTo: pipCallViewController.view.trailingAnchor
141+
),
138142
splitScreenHostingController.view.topAnchor.constraint(equalTo: pipCallViewController.view.topAnchor),
139-
splitScreenHostingController.view.bottomAnchor.constraint(equalTo: pipCallViewController.view.bottomAnchor)
143+
splitScreenHostingController.view.bottomAnchor.constraint(equalTo: pipCallViewController.view.bottomAnchor),
140144
])
141145
}
142146

@@ -167,7 +171,7 @@ public class PictureInPictureController: NSObject, AVPictureInPictureControllerD
167171
oldTrack.remove(secondarySampleView)
168172
}
169173

170-
if let newTrack = newTrack {
174+
if let newTrack {
171175
newTrack.add(secondarySampleView)
172176
splitScreenViewModel.isSecondaryVideoVisible = true
173177
} else {
@@ -188,7 +192,7 @@ public class PictureInPictureController: NSObject, AVPictureInPictureControllerD
188192
return
189193
}
190194
splitScreenViewModel.secondaryPlaceholderText = trackInfo.displayName ?? "Peer"
191-
195+
192196
if trackInfo.hasVideoTrack, let videoTrack = trackInfo.videoTrack {
193197
secondaryVideoTrack = videoTrack
194198
videoTrack.add(secondarySampleView)

packages/ios-client/Sources/FishjamClient/pip/SplitScreenView.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct VideoPreviewContainerView: View {
5757
.foregroundStyle(.white)
5858
.multilineTextAlignment(.center)
5959
.padding()
60-
60+
6161
if isVideoVisible {
6262
ZStack(alignment: .bottomTrailing) {
6363
UIViewRepresentableWrapper(view: sampleView)
@@ -82,7 +82,7 @@ struct VideoPreviewContainerView: View {
8282

8383
extension View {
8484
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
85-
clipShape( RoundedCorner(radius: radius, corners: corners) )
85+
clipShape(RoundedCorner(radius: radius, corners: corners))
8686
}
8787
}
8888

@@ -96,13 +96,16 @@ struct RoundedCorner: Shape {
9696
}
9797

9898
func path(in rect: CGRect) -> Path {
99-
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
99+
let path = UIBezierPath(
100+
roundedRect: rect,
101+
byRoundingCorners: corners,
102+
cornerRadii: CGSize(width: radius, height: radius)
103+
)
100104
return Path(path.cgPath)
101105
}
102106
}
103107

104-
105-
fileprivate struct UIViewRepresentableWrapper: UIViewRepresentable {
108+
private struct UIViewRepresentableWrapper: UIViewRepresentable {
106109
let view: UIView
107110

108111
func makeUIView(context: Context) -> UIView {

0 commit comments

Comments
 (0)