mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Check more
This commit is contained in:
@@ -71,7 +71,6 @@ public enum ContainedViewLayoutTransition {
|
||||
|
||||
public extension ContainedViewLayoutTransition {
|
||||
func updateFrame(node: ASDisplayNode, frame: CGRect, force: Bool = false, beginWithCurrentState: Bool = false, delay: Double = 0.0, completion: ((Bool) -> Void)? = nil) {
|
||||
var frame = frame
|
||||
if frame.origin.x.isNaN {
|
||||
return
|
||||
}
|
||||
@@ -90,6 +89,12 @@ public extension ContainedViewLayoutTransition {
|
||||
if frame.size.height < 0.0 {
|
||||
return
|
||||
}
|
||||
if !ASIsCGRectValidForLayout(CGRect(origin: CGPoint(), size: frame.size)) {
|
||||
return
|
||||
}
|
||||
if !ASIsCGPositionValidForLayout(frame.origin) {
|
||||
return
|
||||
}
|
||||
|
||||
if node.frame.equalTo(frame) && !force {
|
||||
completion?(true)
|
||||
|
||||
Reference in New Issue
Block a user