mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASDisplayNode][ASImageNode] Small refactorings (#2778)
* Comment out template code and fix another comment in ASDisplayNode * Release instance lock a bit sooner and fix indentation in ASImageNode
This commit is contained in:
@@ -2013,7 +2013,7 @@ ASDISPLAYNODE_INLINE BOOL nodeIsInRasterizedTree(ASDisplayNode *node) {
|
||||
|
||||
ASDisplayNodeAssert(subnode, @"Cannot insert a nil subnode");
|
||||
|
||||
// Don't add subnode if it's already if it's already a subnodes
|
||||
// Don't add if it's already a subnode
|
||||
ASDisplayNode *oldParent = subnode.supernode;
|
||||
if (!subnode || subnode == self || oldParent == self) {
|
||||
return;
|
||||
@@ -3063,10 +3063,10 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
|
||||
oldState = _interfaceState;
|
||||
_interfaceState = newState;
|
||||
}
|
||||
|
||||
if ((newState & ASInterfaceStateMeasureLayout) != (oldState & ASInterfaceStateMeasureLayout)) {
|
||||
// Trigger asynchronous measurement if it is not already cached or being calculated.
|
||||
}
|
||||
|
||||
// TODO: Trigger asynchronous measurement if it is not already cached or being calculated.
|
||||
// if ((newState & ASInterfaceStateMeasureLayout) != (oldState & ASInterfaceStateMeasureLayout)) {
|
||||
// }
|
||||
|
||||
// For the Preload and Display ranges, we don't want to call -clear* if not being managed by a range controller.
|
||||
// Otherwise we get flashing behavior from normal UIKit manipulations like navigation controller push / pop.
|
||||
|
||||
Reference in New Issue
Block a user