mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-15 18:59:54 +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];
|
||||
ASDisplayNodeAssert([node isKindOfClass:ASCellNode.class], @"invalid node class, expected ASCellNode");
|
||||
node.layoutDelegate = self;
|
||||
if (node.layoutDelegate == nil) {
|
||||
node.layoutDelegate = self;
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
@ -820,7 +820,9 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
{
|
||||
ASCellNode *node = [_asyncDataSource tableView:self nodeForRowAtIndexPath:indexPath];
|
||||
ASDisplayNodeAssert([node isKindOfClass:ASCellNode.class], @"invalid node class, expected ASCellNode");
|
||||
node.layoutDelegate = self;
|
||||
if (node.layoutDelegate == nil) {
|
||||
node.layoutDelegate = self;
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user