mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Fix: Keep the progress indicator visible after pausing or scrubbing a voice message. (#1969)
This commit is contained in:
@@ -35,11 +35,6 @@ private struct WaveformInteractionModifier: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
GeometryReader { geometry in
|
||||
content
|
||||
.gesture(SpatialTapGesture()
|
||||
.onEnded { tapGesture in
|
||||
let progress = tapGesture.location.x / geometry.size.width
|
||||
onSeek(max(0, min(progress, 1.0)))
|
||||
})
|
||||
.progressCursor(progress: progress) {
|
||||
WaveformCursorView(color: .compound.iconAccentTertiary)
|
||||
.frame(width: cursorVisibleWidth, height: cursorVisibleHeight)
|
||||
@@ -56,6 +51,11 @@ private struct WaveformInteractionModifier: ViewModifier {
|
||||
)
|
||||
.offset(x: -cursorInteractiveSize / 2, y: 0)
|
||||
}
|
||||
.gesture(SpatialTapGesture()
|
||||
.onEnded { tapGesture in
|
||||
let progress = tapGesture.location.x / geometry.size.width
|
||||
onSeek(max(0, min(progress, 1.0)))
|
||||
})
|
||||
}
|
||||
.coordinateSpace(name: Self.namespaceName)
|
||||
.animation(nil, value: progress)
|
||||
|
||||
Reference in New Issue
Block a user