diff --git a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift index 5ffd9020a..cc7932915 100644 --- a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift @@ -434,7 +434,7 @@ Button(action: { audioController.currentVoice = voice.key self.showVoiceSheet = false - }) { + }, label: { HStack { Text(voice.name) @@ -445,8 +445,7 @@ } } .contentShape(Rectangle()) - } - .buttonStyle(PlainButtonStyle()) + }).buttonStyle(PlainButtonStyle()) } } .padding(.top, 32) @@ -455,11 +454,11 @@ } .navigationBarTitle("Voice") .navigationBarTitleDisplayMode(.inline) - .navigationBarItems(leading: Button(action: { self.showVoiceSheet = false }) { + .navigationBarItems(leading: Button(action: { self.showVoiceSheet = false }, label: { Image(systemName: "chevron.backward") .font(.appNavbarIcon) .tint(.appGrayTextContrast) - }) + })) } } diff --git a/apple/OmnivoreKit/Sources/Services/AudioSession/AudioController.swift b/apple/OmnivoreKit/Sources/Services/AudioSession/AudioController.swift index 40a40b773..fdb4a686a 100644 --- a/apple/OmnivoreKit/Sources/Services/AudioSession/AudioController.swift +++ b/apple/OmnivoreKit/Sources/Services/AudioSession/AudioController.swift @@ -268,6 +268,7 @@ timeElapsed = 0 duration = 1 durations = nil + currentAudioIndex = 0 if let stoppedId = stoppedId { EventTracker.track( @@ -491,6 +492,7 @@ } return "" } + currentAudioIndex = 0 } else { textItems = nil } @@ -940,7 +942,7 @@ let str = String(decoding: data, as: UTF8.self) print("result speech file: ", str) - let document = try? JSONDecoder().decode(SpeechDocument.self, from: data) + document = try? JSONDecoder().decode(SpeechDocument.self, from: data) // Cache the file - if it exists if let document = document {