Allow long-press reblur on images

This commit is contained in:
jack
2025-10-15 17:37:19 +01:00
committed by islam
parent 23124b36b7
commit 2f1ba27d51
@@ -106,6 +106,7 @@ struct BlockRevealImageView: View {
loadImage()
}
.gesture(gestureHandler)
.simultaneousGesture(longPressGesture)
}
private func loadImage() {
@@ -140,6 +141,17 @@ struct BlockRevealImageView: View {
}
return doubleTap.exclusively(before: singleTap)
}
private var longPressGesture: some Gesture {
LongPressGesture(minimumDuration: 0.4).onEnded { _ in
guard !isSending else { return }
if !isBlurred {
withAnimation(.easeInOut(duration: 0.2)) {
isBlurred = true
}
}
}
}
}
private struct BlockRevealMask: Shape {