mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Dont scroll the miniplayer when the user is scrubbing audio
This commit is contained in:
parent
e1f28ec189
commit
fd2df9f926
1 changed files with 11 additions and 2 deletions
|
|
@ -402,15 +402,24 @@ public struct MiniPlayer: View {
|
|||
}
|
||||
}
|
||||
|
||||
var scrubbing: Bool {
|
||||
switch audioController.scrubState {
|
||||
case .scrubStarted:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func onDragChanged(value: DragGesture.Value) {
|
||||
if value.translation.height > 0, expanded {
|
||||
if value.translation.height > 0, expanded, !scrubbing {
|
||||
offset = value.translation.height
|
||||
}
|
||||
}
|
||||
|
||||
func onDragEnded(value: DragGesture.Value) {
|
||||
withAnimation(.interactiveSpring()) {
|
||||
if value.translation.height > minExpandedHeight {
|
||||
if value.translation.height > minExpandedHeight, !scrubbing {
|
||||
expanded = false
|
||||
}
|
||||
offset = 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue