mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Merge pull request #1231 from garrettmoon/reducePlaceholderFadeCost
[Placeholders] Only start a fading animation if we're visible. And a threadsafety fix.
This commit is contained in:
@@ -780,11 +780,13 @@ static inline void filterNodesInLayoutAtIndexesWithIntersectingNodes(
|
||||
|
||||
- (BOOL)usesImplicitHierarchyManagement
|
||||
{
|
||||
ASDN::MutexLocker l(_propertyLock);
|
||||
return _usesImplicitHierarchyManagement ?: [[self class] usesImplicitHierarchyManagement];
|
||||
}
|
||||
|
||||
- (void)setUsesImplicitHierarchyManagement:(BOOL)value
|
||||
{
|
||||
ASDN::MutexLocker l(_propertyLock);
|
||||
_usesImplicitHierarchyManagement = value;
|
||||
}
|
||||
|
||||
@@ -1718,7 +1720,7 @@ static NSInteger incrementIfFound(NSInteger i) {
|
||||
[self _tearDownPlaceholderLayer];
|
||||
};
|
||||
|
||||
if (_placeholderFadeDuration > 0.0) {
|
||||
if (_placeholderFadeDuration > 0.0 && ASInterfaceStateIncludesVisible(self.interfaceState)) {
|
||||
[CATransaction begin];
|
||||
[CATransaction setCompletionBlock:cleanupBlock];
|
||||
[CATransaction setAnimationDuration:_placeholderFadeDuration];
|
||||
|
||||
Reference in New Issue
Block a user