mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Update manual display logic
Postpone manual display until a future release when it can be called on any thread. Provide the current node manual display logic as a category on ASDisplayNode only available for ASRangeController. Deprecate -displayImmediately.
This commit is contained in:
@@ -434,33 +434,6 @@ void ASDisplayNodePerformBlockOnMainThread(void (^block)())
|
||||
_contentsScaleForDisplay = contentsScaleForDisplay;
|
||||
}
|
||||
|
||||
- (void)display
|
||||
{
|
||||
ASDisplayNodeAssertMainThread();
|
||||
ASDisplayNodeAssert(self.nodeLoaded, @"backing store must be loaded before calling -display");
|
||||
|
||||
// rendering a backing store requires a node be laid out
|
||||
[self __layout];
|
||||
|
||||
CALayer *layer = [self isLayerBacked] ? self.layer : self.view.layer;
|
||||
|
||||
if (layer.contents) {
|
||||
return;
|
||||
}
|
||||
|
||||
[layer setNeedsDisplay];
|
||||
[layer displayIfNeeded];
|
||||
}
|
||||
|
||||
- (void)recursivelyDisplay
|
||||
{
|
||||
for (ASDisplayNode *node in self.subnodes) {
|
||||
[node recursivelyDisplay];
|
||||
}
|
||||
|
||||
[self display];
|
||||
}
|
||||
|
||||
- (void)displayImmediately
|
||||
{
|
||||
ASDisplayNodeAssertMainThread();
|
||||
|
||||
Reference in New Issue
Block a user