mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 11:23:48 +00:00
Make HierarchyTrackingNode public
This commit is contained in:
parent
fad2291e56
commit
6b45ef45a6
@ -23,10 +23,10 @@ func isViewVisibleInHierarchy(_ view: UIView, _ initial: Bool = true) -> Bool {
|
||||
}
|
||||
}
|
||||
|
||||
private final class HierarchyTrackingNode: ASDisplayNode {
|
||||
public final class HierarchyTrackingNode: ASDisplayNode {
|
||||
private let f: (Bool) -> Void
|
||||
|
||||
init(_ f: @escaping (Bool) -> Void) {
|
||||
public init(_ f: @escaping (Bool) -> Void) {
|
||||
self.f = f
|
||||
|
||||
super.init()
|
||||
@ -34,13 +34,13 @@ private final class HierarchyTrackingNode: ASDisplayNode {
|
||||
self.isLayerBacked = true
|
||||
}
|
||||
|
||||
override func didEnterHierarchy() {
|
||||
override public func didEnterHierarchy() {
|
||||
super.didEnterHierarchy()
|
||||
|
||||
self.f(true)
|
||||
}
|
||||
|
||||
override func didExitHierarchy() {
|
||||
override public func didExitHierarchy() {
|
||||
super.didExitHierarchy()
|
||||
|
||||
self.f(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user