mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Reactions update
This commit is contained in:
@@ -2,13 +2,18 @@ import Foundation
|
||||
import AsyncDisplayKit
|
||||
|
||||
open class ContextControllerSourceNode: ASDisplayNode {
|
||||
private var contextGesture: ContextGesture?
|
||||
public private(set) var contextGesture: ContextGesture?
|
||||
|
||||
public var isGestureEnabled: Bool = true {
|
||||
didSet {
|
||||
self.contextGesture?.isEnabled = self.isGestureEnabled
|
||||
}
|
||||
}
|
||||
public var beginDelay: Double = 0.12 {
|
||||
didSet {
|
||||
self.contextGesture?.beginDelay = self.beginDelay
|
||||
}
|
||||
}
|
||||
public var animateScale: Bool = true
|
||||
|
||||
public var activated: ((ContextGesture, CGPoint) -> Void)?
|
||||
@@ -31,6 +36,9 @@ open class ContextControllerSourceNode: ASDisplayNode {
|
||||
self.contextGesture = contextGesture
|
||||
self.view.addGestureRecognizer(contextGesture)
|
||||
|
||||
contextGesture.beginDelay = self.beginDelay
|
||||
contextGesture.isEnabled = self.isGestureEnabled
|
||||
|
||||
contextGesture.shouldBegin = { [weak self] point in
|
||||
guard let strongSelf = self, !strongSelf.bounds.width.isZero else {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user