fix: improve seek gesture priority in mini player

Change seek gesture from .gesture to .highPriorityGesture to ensure
horizontal press-and-drag seeking takes precedence over the vertical
swipe gesture. This fixes unreliable seeking when dragging on the
mini player progress bar.
This commit is contained in:
Admin
2026-03-08 14:16:05 +05:00
parent 0c2349f259
commit 1e85f1c0bc

View File

@@ -29,7 +29,7 @@ struct MiniPlayerView: View {
.frame(width: max(0, geo.size.width * (isSeeking ? seekProgress : progress))) .frame(width: max(0, geo.size.width * (isSeeking ? seekProgress : progress)))
} }
.contentShape(Rectangle()) .contentShape(Rectangle())
.gesture( .highPriorityGesture(
DragGesture(minimumDistance: 0) DragGesture(minimumDistance: 0)
.onChanged { value in .onChanged { value in
isSeeking = true isSeeking = true
@@ -165,6 +165,8 @@ struct MiniPlayerView: View {
} }
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 12) .padding(.vertical, 12)
// Block interaction with content layer from affecting progress bar
.allowsHitTesting(true)
} }
.background( .background(
// Dark rounded background (pill-shaped with full circular ends) // Dark rounded background (pill-shaped with full circular ends)