mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Thanks @scottg, this is a better more generalized solution.
This commit is contained in:
@@ -2083,7 +2083,13 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
|
||||
[self setDisplaySuspended:NO];
|
||||
} else {
|
||||
[self setDisplaySuspended:YES];
|
||||
[self clearContents];
|
||||
//schedule clear contents on next runloop
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
ASDN::MutexLocker l(_propertyLock);
|
||||
if (ASInterfaceStateIncludesDisplay(_interfaceState) == NO) {
|
||||
[self clearContents];
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// NOTE: This case isn't currently supported as setInterfaceState: isn't exposed externally, and all
|
||||
@@ -2095,7 +2101,13 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
|
||||
[ASDisplayNode scheduleNodeForRecursiveDisplay:self];
|
||||
} else {
|
||||
[[self asyncLayer] cancelAsyncDisplay];
|
||||
[self clearContents];
|
||||
//schedule clear contents on next runloop
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
ASDN::MutexLocker l(_propertyLock);
|
||||
if (ASInterfaceStateIncludesDisplay(_interfaceState) == NO) {
|
||||
[self clearContents];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user