Skip to content

Commit 82b032e

Browse files
committed
formatting
1 parent cbb1182 commit 82b032e

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

firebaseai/FirebaseAIExample/Features/Live/Screens/LiveScreen.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct LiveScreen: View {
2828
self.backendType = backendType
2929
_viewModel =
3030
StateObject(wrappedValue: LiveViewModel(backendType: backendType,
31-
sample: sample))
31+
sample: sample))
3232
}
3333

3434
var body: some View {
@@ -50,11 +50,11 @@ struct LiveScreen: View {
5050
)
5151
}
5252
.padding()
53-
.navigationTitle(viewModel.title)
54-
.navigationBarTitleDisplayMode(.inline)
55-
.background(viewModel.backgroundColor ?? .clear)
56-
}
53+
.navigationTitle(viewModel.title)
54+
.navigationBarTitleDisplayMode(.inline)
55+
.background(viewModel.backgroundColor ?? .clear)
5756
}
57+
}
5858

5959
#Preview {
6060
LiveScreen(backendType: .googleAI)

firebaseai/FirebaseAIExample/Features/Live/ViewModels/LiveViewModel.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ class LiveViewModel: ObservableObject {
6363
: FirebaseAI.firebaseAI(backend: .vertexAI())
6464

6565
model = firebaseService.liveModel(
66-
modelName: (backendType == .googleAI) ? "gemini-2.5-flash-native-audio-preview-09-2025" : "gemini-live-2.5-flash-preview-native-audio-09-2025",
66+
modelName: (backendType == .googleAI) ? "gemini-2.5-flash-native-audio-preview-09-2025" :
67+
"gemini-live-2.5-flash-preview-native-audio-09-2025",
6768
generationConfig: sample?.liveGenerationConfig,
6869
tools: sample?.tools,
6970
systemInstruction: sample?.systemInstruction
@@ -81,7 +82,7 @@ class LiveViewModel: ObservableObject {
8182
}
8283

8384
#if targetEnvironment(simulator)
84-
logger.warning("Playback audio is disabled on the simulator.")
85+
logger.warning("Playback audio is disabled on the simulator.")
8586
#endif
8687

8788
guard await requestRecordPermission() else {
@@ -211,7 +212,7 @@ class LiveViewModel: ObservableObject {
211212
if let part = part as? InlineDataPart {
212213
if part.mimeType.starts(with: "audio/pcm") {
213214
#if !targetEnvironment(simulator)
214-
try await audioController?.playAudio(audio: part.data)
215+
try await audioController?.playAudio(audio: part.data)
215216
#endif
216217
} else {
217218
logger.warning("Received non audio inline data part: \(part.mimeType)")

firebaseai/FirebaseAIExample/Features/Live/Views/ConnectButton.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ struct ConnectButton: View {
7373
lineWidth: 3
7474
)
7575
).tint(color)
76-
.onAppear {
77-
withAnimation(.linear(duration: 5).repeatForever(autoreverses: false)) {
78-
self.gradientAngle = .degrees(360)
76+
.onAppear {
77+
withAnimation(.linear(duration: 5).repeatForever(autoreverses: false)) {
78+
self.gradientAngle = .degrees(360)
79+
}
7980
}
80-
}
8181
}
8282

8383
private func onClick() {

firebaseai/FirebaseAIExample/Features/Live/Views/TranscriptView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct TranscriptView: View {
2525
.transition(.opacity)
2626
.padding(.horizontal)
2727
.id("transcript")
28-
}.onChange(of: typewriter.text, initial: false) { (old, new) in
28+
}.onChange(of: typewriter.text, initial: false) { old, new in
2929
proxy.scrollTo("transcript", anchor: .bottom)
3030
}
3131
}

firebaseai/FirebaseAIExample/Shared/Models/Sample.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ extension Sample {
308308
outputAudioTranscription: AudioTranscriptionConfig()
309309
),
310310
tip: "Try asking the model to change the background color",
311-
312-
)
311+
),
313312
]
314313

315314
public static var sample = samples[0]

0 commit comments

Comments
 (0)