From ac388c7da55151f38b787b4d6ae6df1fd09ceaeb Mon Sep 17 00:00:00 2001 From: Ali <> Date: Sat, 10 Apr 2021 00:27:33 +0400 Subject: [PATCH] Fix isPinchGestureEnabled --- submodules/ContextUI/Sources/PinchController.swift | 2 +- .../TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/submodules/ContextUI/Sources/PinchController.swift b/submodules/ContextUI/Sources/PinchController.swift index 214e88da3c..ba9ade47eb 100644 --- a/submodules/ContextUI/Sources/PinchController.swift +++ b/submodules/ContextUI/Sources/PinchController.swift @@ -152,7 +152,7 @@ public final class PinchSourceContainerNode: ASDisplayNode, UIGestureRecognizerD fileprivate let gesture: PinchSourceGesture fileprivate var panGesture: UIPanGestureRecognizer? - public var isPinchGestureEnabled: Bool = false { + public var isPinchGestureEnabled: Bool = true { didSet { if self.isPinchGestureEnabled != oldValue { self.gesture.isEnabled = self.isPinchGestureEnabled diff --git a/submodules/TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift b/submodules/TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift index c06c89b74b..1f0f32bcbb 100644 --- a/submodules/TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift +++ b/submodules/TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift @@ -1050,6 +1050,8 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTransitio } strongSelf.updateStatus(animated: synchronousLoads) + + strongSelf.pinchContainerNode.isPinchGestureEnabled = !isSecretMedia } }) })