mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Rename ASCellNode delegate to layoutDelegate to avoid common naming overlap
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
typedef NSUInteger ASCellNodeAnimation;
|
||||
|
||||
@protocol ASCellNodeDelegate <NSObject>
|
||||
@protocol ASCellNodeLayoutDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* Notifies the delegate that the specified cell node has done a relayout.
|
||||
@@ -72,7 +72,7 @@ typedef NSUInteger ASCellNodeAnimation;
|
||||
/*
|
||||
* A delegate to be notified (on main thread) after a relayout.
|
||||
*/
|
||||
@property (nonatomic, weak) id<ASCellNodeDelegate> delegate;
|
||||
@property (nonatomic, weak) id<ASCellNodeLayoutDelegate> layoutDelegate;
|
||||
|
||||
/*
|
||||
* A constant that is passed to the delegate to indicate how a relayout is to be animated.
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
ASDisplayNodeAssertThreadAffinity(self);
|
||||
[super setNeedsLayout];
|
||||
|
||||
if (_delegate != nil) {
|
||||
if (_layoutDelegate != nil) {
|
||||
ASPerformBlockOnMainThread(^{
|
||||
[_delegate node:self didRelayoutWithSuggestedAnimation:_relayoutAnimation];
|
||||
[_layoutDelegate node:self didRelayoutWithSuggestedAnimation:_relayoutAnimation];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
#pragma mark -
|
||||
#pragma mark ASCollectionView.
|
||||
|
||||
@interface ASCollectionView () <ASRangeControllerDelegate, ASDataControllerSource, ASCellNodeDelegate> {
|
||||
@interface ASCollectionView () <ASRangeControllerDelegate, ASDataControllerSource, ASCellNodeLayoutDelegate> {
|
||||
_ASCollectionViewProxy *_proxyDataSource;
|
||||
_ASCollectionViewProxy *_proxyDelegate;
|
||||
|
||||
@@ -655,7 +655,7 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
{
|
||||
ASCellNode *node = [_asyncDataSource collectionView:self nodeForItemAtIndexPath:indexPath];
|
||||
ASDisplayNodeAssert([node isKindOfClass:ASCellNode.class], @"invalid node class, expected ASCellNode");
|
||||
node.delegate = self;
|
||||
node.layoutDelegate = self;
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
#pragma mark -
|
||||
#pragma mark ASTableView
|
||||
|
||||
@interface ASTableView () <ASRangeControllerDelegate, ASDataControllerSource, _ASTableViewCellDelegate, ASCellNodeDelegate> {
|
||||
@interface ASTableView () <ASRangeControllerDelegate, ASDataControllerSource, _ASTableViewCellDelegate, ASCellNodeLayoutDelegate> {
|
||||
_ASTableViewProxy *_proxyDataSource;
|
||||
_ASTableViewProxy *_proxyDelegate;
|
||||
|
||||
@@ -820,7 +820,7 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
{
|
||||
ASCellNode *node = [_asyncDataSource tableView:self nodeForRowAtIndexPath:indexPath];
|
||||
ASDisplayNodeAssert([node isKindOfClass:ASCellNode.class], @"invalid node class, expected ASCellNode");
|
||||
node.delegate = self;
|
||||
node.layoutDelegate = self;
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user