From b3cad81a3ae8ccb3833c027c4e90638bb9c60d46 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Wed, 22 Feb 2023 23:48:07 +0400 Subject: [PATCH] Various fixes --- submodules/Display/Source/ListView.swift | 2 +- submodules/TelegramUI/Sources/ChatControllerNode.swift | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/submodules/Display/Source/ListView.swift b/submodules/Display/Source/ListView.swift index 80f7a26266..b01493bee6 100644 --- a/submodules/Display/Source/ListView.swift +++ b/submodules/Display/Source/ListView.swift @@ -67,7 +67,6 @@ public final class ListViewBackingView: UIView { override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { if !self.isHidden, let target = self.target { if target.bounds.contains(point) { - target.scroller.forceDecelerating = false if target.decelerationAnimator != nil { target.decelerationAnimator?.isPaused = true target.decelerationAnimator = nil @@ -836,6 +835,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture } self.scrolledToItem = nil + self.scroller.forceDecelerating = false self.isDragging = true self.beganInteractiveDragging(self.touchesPosition) diff --git a/submodules/TelegramUI/Sources/ChatControllerNode.swift b/submodules/TelegramUI/Sources/ChatControllerNode.swift index 5fa8465e4c..f9c9d4b288 100644 --- a/submodules/TelegramUI/Sources/ChatControllerNode.swift +++ b/submodules/TelegramUI/Sources/ChatControllerNode.swift @@ -1426,6 +1426,8 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate { isSelectionEnabled = false } else if case .pinnedMessages = self.chatPresentationInterfaceState.subject { isSelectionEnabled = false + } else if self.chatPresentationInterfaceState.inputTextPanelState.mediaRecordingState != nil { + isSelectionEnabled = false } self.historyNode.isSelectionGestureEnabled = isSelectionEnabled