mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix GalleryPagerNode gesture conflict
This commit is contained in:
parent
155b61a678
commit
868dcdf05d
@ -983,4 +983,8 @@ typedef NS_ENUM(NSInteger, ASLayoutEngineType) {
|
||||
|
||||
@end
|
||||
|
||||
@interface UIView (ASDisplayNodeInternal)
|
||||
@property (nullable, weak) ASDisplayNode *asyncdisplaykit_node;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@ -316,10 +316,6 @@ __unused static NSString * _Nonnull NSStringFromASHierarchyStateChange(ASHierarc
|
||||
- (NSArray *)accessibilityElements;
|
||||
@end;
|
||||
|
||||
@interface UIView (ASDisplayNodeInternal)
|
||||
@property (nullable, weak) ASDisplayNode *asyncdisplaykit_node;
|
||||
@end
|
||||
|
||||
@interface CALayer (ASDisplayNodeInternal)
|
||||
@property (nullable, weak) ASDisplayNode *asyncdisplaykit_node;
|
||||
@end
|
||||
|
@ -145,7 +145,13 @@ public final class GalleryPagerNode: ASDisplayNode, UIScrollViewDelegate, UIGest
|
||||
let recognizer = TapLongTapOrDoubleTapGestureRecognizer(target: self, action: #selector(self.tapLongTapOrDoubleTapGesture(_:)))
|
||||
recognizer.delegate = self
|
||||
self.tapRecognizer = recognizer
|
||||
recognizer.tapActionAtPoint = { _ in
|
||||
recognizer.tapActionAtPoint = { [weak self] point in
|
||||
guard let strongSelf = self else {
|
||||
return .fail
|
||||
}
|
||||
if let result = strongSelf.hitTest(point, with: nil), let node = result.asyncdisplaykit_node as? ASButtonNode {
|
||||
return .fail
|
||||
}
|
||||
return .keepWithSingleTap
|
||||
}
|
||||
recognizer.highlight = { [weak self] point in
|
||||
|
Loading…
x
Reference in New Issue
Block a user