mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Ensure the audio index is updated when items are changed
This commit is contained in:
parent
2e9bda7835
commit
bafe1bd338
2 changed files with 7 additions and 6 deletions
|
|
@ -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)
|
||||
})
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue