mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-12 17:30:34 +00:00
Simplify measure call structure
This commit is contained in:
parent
7a3987a467
commit
3abe6d9181
@ -596,14 +596,9 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
}
|
||||
|
||||
- (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize
|
||||
{
|
||||
ASDN::MutexLocker l(_propertyLock);
|
||||
return [self __measureWithSizeRange:constrainedSize];
|
||||
}
|
||||
|
||||
- (ASLayout *)__measureWithSizeRange:(ASSizeRange)constrainedSize
|
||||
{
|
||||
ASDisplayNodeAssertThreadAffinity(self);
|
||||
ASDN::MutexLocker l(_propertyLock);
|
||||
|
||||
if (![self __shouldSize])
|
||||
return nil;
|
||||
|
||||
@ -131,9 +131,7 @@ typedef NS_OPTIONS(NSUInteger, ASDisplayNodeMethodOverrides)
|
||||
- (BOOL)__shouldLoadViewOrLayer;
|
||||
- (BOOL)__shouldSize;
|
||||
|
||||
// Core implementation of -measureWithSizeRange:. Must be called with _propertyLock held.
|
||||
- (ASLayout *)__measureWithSizeRange:(ASSizeRange)constrainedSize;
|
||||
|
||||
// Invoked by a call to setNeedsLayout to the underlying view
|
||||
- (void)__setNeedsLayout;
|
||||
- (void)__layout;
|
||||
- (void)__setSupernode:(ASDisplayNode *)supernode;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user