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