mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-06 21:22:44 +00:00
Fix unusual cell content blanking issue when making existing cells much taller.
This commit is contained in:
@@ -646,7 +646,6 @@ typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node);
|
||||
* @param node The node to be added.
|
||||
*/
|
||||
- (void)addSubnode:(ASDisplayNode *)node;
|
||||
- (NSString *)name;
|
||||
@end
|
||||
|
||||
/** CALayer(AsyncDisplayKit) defines convenience method for adding sub-ASDisplayNode to a CALayer. */
|
||||
@@ -657,7 +656,6 @@ typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node);
|
||||
* @param node The node to be added.
|
||||
*/
|
||||
- (void)addSubnode:(ASDisplayNode *)node;
|
||||
- (NSString *)name;
|
||||
@end
|
||||
|
||||
@interface ASDisplayNode (Deprecated)
|
||||
|
||||
@@ -2190,11 +2190,6 @@ static const char *ASDisplayNodeAssociatedNodeKey = "ASAssociatedNode";
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *)name
|
||||
{
|
||||
return self.asyncdisplaykit_node.name;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation CALayer (AsyncDisplayKit)
|
||||
@@ -2204,11 +2199,6 @@ static const char *ASDisplayNodeAssociatedNodeKey = "ASAssociatedNode";
|
||||
[self addSublayer:node.layer];
|
||||
}
|
||||
|
||||
- (NSString *)name
|
||||
{
|
||||
return self.asyncdisplaykit_node.name;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,12 @@
|
||||
ASDisplayNodeAssertMainThread();
|
||||
ASDisplayNodeAssert(rangeType == ASLayoutRangeTypeRender, @"Render delegate should not handle other ranges");
|
||||
|
||||
// If a node had previously been onscreen but now is only in the working range,
|
||||
// ensure its view is not orphaned in a UITableViewCell in the reuse pool.
|
||||
if (![node isLayerBacked] && node.view.superview) {
|
||||
[node.view removeFromSuperview];
|
||||
}
|
||||
|
||||
[node recursivelySetDisplaySuspended:NO];
|
||||
|
||||
// Add the node's layer to an off-screen window to trigger display and mark its contents as non-volatile.
|
||||
|
||||
Reference in New Issue
Block a user