diff --git a/bitchat/Views/Media/BlockRevealImageView.swift b/bitchat/Views/Media/BlockRevealImageView.swift index 78af23b9..1f2283c5 100644 --- a/bitchat/Views/Media/BlockRevealImageView.swift +++ b/bitchat/Views/Media/BlockRevealImageView.swift @@ -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 {