Various fixes

This commit is contained in:
Ilya Laktyushin 2023-02-22 23:48:07 +04:00
parent 76c0ee9975
commit b3cad81a3a
2 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,6 @@ public final class ListViewBackingView: UIView {
override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if !self.isHidden, let target = self.target { if !self.isHidden, let target = self.target {
if target.bounds.contains(point) { if target.bounds.contains(point) {
target.scroller.forceDecelerating = false
if target.decelerationAnimator != nil { if target.decelerationAnimator != nil {
target.decelerationAnimator?.isPaused = true target.decelerationAnimator?.isPaused = true
target.decelerationAnimator = nil target.decelerationAnimator = nil
@ -836,6 +835,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
} }
self.scrolledToItem = nil self.scrolledToItem = nil
self.scroller.forceDecelerating = false
self.isDragging = true self.isDragging = true
self.beganInteractiveDragging(self.touchesPosition) self.beganInteractiveDragging(self.touchesPosition)

View File

@ -1426,6 +1426,8 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
isSelectionEnabled = false isSelectionEnabled = false
} else if case .pinnedMessages = self.chatPresentationInterfaceState.subject { } else if case .pinnedMessages = self.chatPresentationInterfaceState.subject {
isSelectionEnabled = false isSelectionEnabled = false
} else if self.chatPresentationInterfaceState.inputTextPanelState.mediaRecordingState != nil {
isSelectionEnabled = false
} }
self.historyNode.isSelectionGestureEnabled = isSelectionEnabled self.historyNode.isSelectionGestureEnabled = isSelectionEnabled