mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-13 09:50:17 +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
|
- (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize
|
||||||
{
|
|
||||||
ASDN::MutexLocker l(_propertyLock);
|
|
||||||
return [self __measureWithSizeRange:constrainedSize];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (ASLayout *)__measureWithSizeRange:(ASSizeRange)constrainedSize
|
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssertThreadAffinity(self);
|
ASDisplayNodeAssertThreadAffinity(self);
|
||||||
|
ASDN::MutexLocker l(_propertyLock);
|
||||||
|
|
||||||
if (![self __shouldSize])
|
if (![self __shouldSize])
|
||||||
return nil;
|
return nil;
|
||||||
|
|||||||
@ -131,9 +131,7 @@ typedef NS_OPTIONS(NSUInteger, ASDisplayNodeMethodOverrides)
|
|||||||
- (BOOL)__shouldLoadViewOrLayer;
|
- (BOOL)__shouldLoadViewOrLayer;
|
||||||
- (BOOL)__shouldSize;
|
- (BOOL)__shouldSize;
|
||||||
|
|
||||||
// Core implementation of -measureWithSizeRange:. Must be called with _propertyLock held.
|
// Invoked by a call to setNeedsLayout to the underlying view
|
||||||
- (ASLayout *)__measureWithSizeRange:(ASSizeRange)constrainedSize;
|
|
||||||
|
|
||||||
- (void)__setNeedsLayout;
|
- (void)__setNeedsLayout;
|
||||||
- (void)__layout;
|
- (void)__layout;
|
||||||
- (void)__setSupernode:(ASDisplayNode *)supernode;
|
- (void)__setSupernode:(ASDisplayNode *)supernode;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user