mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Notify ASCellNodeDelegate even if a relayout doesn't result in a resize
If the delegate is an ASTableView, relayoutAnimation will still be considered for animation.
This commit is contained in:
@@ -53,15 +53,12 @@
|
||||
|
||||
- (void)setNeedsLayout
|
||||
{
|
||||
ASDisplayNodeAssertThreadAffinity(self);
|
||||
|
||||
CGSize oldSize = self.calculatedSize;
|
||||
ASDisplayNodeAssertThreadAffinity(self);
|
||||
[super setNeedsLayout];
|
||||
CGSize newSize = self.calculatedSize;
|
||||
|
||||
if (_delegate != nil && !CGSizeEqualToSize(oldSize, newSize)) {
|
||||
if (_delegate != nil) {
|
||||
ASPerformBlockOnMainThread(^{
|
||||
[_delegate node:self didRelayoutToNewSize:newSize suggestedAnimation:_relayoutAnimation];
|
||||
[_delegate node:self didRelayoutWithSuggestedAnimation:_relayoutAnimation];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user