mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
support layers as well as views when doing ASDisplayCell cleanup (in case we add support for layer-backed ASDisplayCells in the future.)
This commit is contained in:
@@ -514,8 +514,12 @@ static void *kASSizingQueueContext = &kASSizingQueueContext;
|
|||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
[_nodes enumerateObjectsUsingBlock:^(NSMutableArray *section, NSUInteger sectionIndex, BOOL *stop) {
|
[_nodes enumerateObjectsUsingBlock:^(NSMutableArray *section, NSUInteger sectionIndex, BOOL *stop) {
|
||||||
[section enumerateObjectsUsingBlock:^(ASCellNode *node, NSUInteger rowIndex, BOOL *stop) {
|
[section enumerateObjectsUsingBlock:^(ASCellNode *node, NSUInteger rowIndex, BOOL *stop) {
|
||||||
if (node.isNodeLoaded && node.view.superview) {
|
if (node.isNodeLoaded) {
|
||||||
[node.view removeFromSuperview];
|
if (node.layerBacked) {
|
||||||
|
[node.layer removeFromSuperlayer];
|
||||||
|
} else {
|
||||||
|
[node.view removeFromSuperview];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
|
|||||||
Reference in New Issue
Block a user