mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASDisplayNode] Do not start measurement for a transition if we have never been provided a constrainedSize. (#1844)
This commit is contained in:
@@ -695,6 +695,11 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
shouldMeasureAsync:(BOOL)shouldMeasureAsync
|
||||
measurementCompletion:(void(^)())completion
|
||||
{
|
||||
if (_layout == nil) {
|
||||
// constrainedSizeRange returns a struct and is invalid to call on nil.
|
||||
// Defaulting to CGSizeZero can cause negative values in client layout code.
|
||||
return;
|
||||
}
|
||||
[self invalidateCalculatedLayout];
|
||||
[self transitionLayoutWithSizeRange:_layout.constrainedSizeRange
|
||||
animated:animated
|
||||
|
||||
Reference in New Issue
Block a user