mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-03 11:44:46 +00:00
Merge pull request #2676 from maicki/MSRevertConstrainedSizeChanges
Revert constrainedSize changes that should have never made it in
This commit is contained in:
@@ -1692,13 +1692,14 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
CGSize boundsSizeForLayout = ASCeilSizeValues(self.threadSafeBounds.size);
|
||||
|
||||
// Checkout if constrained size of pending or calculated display node layout can be used
|
||||
if (_pendingDisplayNodeLayout != nullptr
|
||||
&& CGSizeEqualToSize(_pendingDisplayNodeLayout->layout.size, boundsSizeForLayout)) {
|
||||
if (_pendingDisplayNodeLayout != nullptr
|
||||
&& (_pendingDisplayNodeLayout->requestedLayoutFromAbove
|
||||
|| CGSizeEqualToSize(_pendingDisplayNodeLayout->layout.size, boundsSizeForLayout))) {
|
||||
// We assume the size from the last returned layoutThatFits: layout was applied so use the pending display node
|
||||
// layout constrained size
|
||||
return _pendingDisplayNodeLayout->constrainedSize;
|
||||
} else if (_calculatedDisplayNodeLayout->layout != nil
|
||||
&& (_calculatedDisplayNodeLayout->requestedLayoutFromAbove == NO
|
||||
&& (_calculatedDisplayNodeLayout->requestedLayoutFromAbove
|
||||
|| CGSizeEqualToSize(_calculatedDisplayNodeLayout->layout.size, boundsSizeForLayout))) {
|
||||
// We assume the _calculatedDisplayNodeLayout is still valid and the frame is not different
|
||||
return _calculatedDisplayNodeLayout->constrainedSize;
|
||||
|
||||
Reference in New Issue
Block a user