mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-03 19:54:31 +00:00
Our calculated layout is suitable for this constrainedSize, so keep using it and invalidate any pending layout that has been generated in the past. (#2706)
This commit is contained in:
committed by
GitHub
parent
1997073802
commit
e361d00a73
@@ -893,6 +893,9 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
|
||||
if (_calculatedDisplayNodeLayout->isValidForConstrainedSizeParentSize(constrainedSize, parentSize)) {
|
||||
ASDisplayNodeAssertNotNil(_calculatedDisplayNodeLayout->layout, @"-[ASDisplayNode layoutThatFits:parentSize:] _calculatedDisplayNodeLayout->layout should not be nil! %@", self);
|
||||
// Our calculated layout is suitable for this constrainedSize, so keep using it and
|
||||
// invalidate any pending layout that has been generated in the past.
|
||||
_pendingDisplayNodeLayout = nullptr;
|
||||
return _calculatedDisplayNodeLayout->layout ?: [ASLayout layoutWithLayoutElement:self size:{0, 0}];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user