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