mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Improvements to the efficiency of recursivelySetInterfaceState: and the beta range controller.
This commit is contained in:
@@ -39,7 +39,6 @@ static NSString * const kDefaultChildrenKey = @"kDefaultChildrenKey";
|
||||
if (!(self = [super init])) {
|
||||
return nil;
|
||||
}
|
||||
_layoutChildren = [NSMutableDictionary dictionary];
|
||||
_isMutable = YES;
|
||||
return self;
|
||||
}
|
||||
@@ -56,11 +55,6 @@ static NSString * const kDefaultChildrenKey = @"kDefaultChildrenKey";
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setChild:(id<ASLayoutable>)child;
|
||||
{
|
||||
[self setChild:child forIdentifier:kDefaultChildKey];
|
||||
}
|
||||
|
||||
- (id<ASLayoutable>)layoutableToAddFromLayoutable:(id<ASLayoutable>)child
|
||||
{
|
||||
if (self.isFinalLayoutable == NO) {
|
||||
@@ -88,6 +82,19 @@ static NSString * const kDefaultChildrenKey = @"kDefaultChildrenKey";
|
||||
return child;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)layoutChildren
|
||||
{
|
||||
if (!_layoutChildren) {
|
||||
_layoutChildren = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return _layoutChildren;
|
||||
}
|
||||
|
||||
- (void)setChild:(id<ASLayoutable>)child;
|
||||
{
|
||||
[self setChild:child forIdentifier:kDefaultChildKey];
|
||||
}
|
||||
|
||||
- (void)setChild:(id<ASLayoutable>)child forIdentifier:(NSString *)identifier
|
||||
{
|
||||
ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable");
|
||||
|
||||
Reference in New Issue
Block a user