mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 19:30:29 +00:00
Remove styleClass property from ASLayoutable for now (#2279)
This commit is contained in:
parent
75dca556e6
commit
9f55de2c6c
@ -300,7 +300,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
_contentsScaleForDisplay = ASScreenScale();
|
||||
_displaySentinel = [[ASSentinel alloc] init];
|
||||
|
||||
_style = [[[[self class] styleClass] alloc] init];
|
||||
_style = [[ASLayoutableStyle alloc] init];
|
||||
_preferredFrameSize = CGSizeZero;
|
||||
_environmentState = ASEnvironmentStateMakeDefault();
|
||||
|
||||
@ -723,11 +723,6 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
|
||||
#pragma mark - Style
|
||||
|
||||
+ (Class)styleClass
|
||||
{
|
||||
return [ASLayoutableStyle class];
|
||||
}
|
||||
|
||||
- (ASLayoutableStyle *)style
|
||||
{
|
||||
ASDN::MutexLocker l(__instanceLock__);
|
||||
|
||||
@ -59,7 +59,7 @@ typedef std::map<unsigned long, id<ASLayoutable>, std::less<unsigned long>> ASCh
|
||||
|
||||
_isMutable = YES;
|
||||
_environmentState = ASEnvironmentStateMakeDefault();
|
||||
_style = [[[[self class] styleClass] alloc] init];
|
||||
_style = [[ASLayoutableStyle alloc] init];
|
||||
|
||||
return self;
|
||||
}
|
||||
@ -76,11 +76,6 @@ typedef std::map<unsigned long, id<ASLayoutable>, std::less<unsigned long>> ASCh
|
||||
|
||||
#pragma mark - Style
|
||||
|
||||
+ (Class)styleClass
|
||||
{
|
||||
return [ASLayoutableStyle class];
|
||||
}
|
||||
|
||||
- (ASLayoutableStyle *)style
|
||||
{
|
||||
ASDN::MutexLocker l(__instanceLock__);
|
||||
|
||||
@ -69,16 +69,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) ASLayoutableStyle *style;
|
||||
|
||||
/**
|
||||
* @discussion This property contains the ASLayoutableStyle class object by default. Subclasses can use this property to
|
||||
* return a different size class as needed. For example, if your layoutable would like extend the style object to support
|
||||
* more properties you might want to set this property to a custom subclass of ASLayoutableStyle.
|
||||
*
|
||||
* This property is set only once early in the creation of the layoutable to create the corresponding style object.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) Class styleClass;
|
||||
|
||||
|
||||
#pragma mark - Calculate layout
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user