mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
Only set a default layout delegate to ASCellNode if it is not provided by the async data source
This commit is contained in:
parent
9e4c274a5b
commit
12dbfd1992
@ -655,7 +655,9 @@ 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");
|
||||||
|
if (node.layoutDelegate == nil) {
|
||||||
node.layoutDelegate = self;
|
node.layoutDelegate = self;
|
||||||
|
}
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -820,7 +820,9 @@ 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");
|
||||||
|
if (node.layoutDelegate == nil) {
|
||||||
node.layoutDelegate = self;
|
node.layoutDelegate = self;
|
||||||
|
}
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user