Remove unused getAllNodes support from Layout plugin impl
Summary: Added in D14209157, but the JavaScript no longer ever calls this method. Reviewed By: jknoxville Differential Revision: D21290792 fbshipit-source-id: df1969d83f0dc096a24977c15c27100d2f2bdfc0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
60e9ebb4f1
commit
affade67ff
@@ -91,15 +91,6 @@
|
||||
responder);
|
||||
}];
|
||||
|
||||
[connection receive:@"getAllNodes"
|
||||
withBlock:^(NSDictionary* params, id<FlipperResponder> responder) {
|
||||
FlipperPerformBlockOnMainThread(
|
||||
^{
|
||||
[weakSelf onCallGetAllNodesWithResponder:responder];
|
||||
},
|
||||
responder);
|
||||
}];
|
||||
|
||||
[connection receive:@"getNodes"
|
||||
withBlock:^(NSDictionary* params, id<FlipperResponder> responder) {
|
||||
FlipperPerformBlockOnMainThread(
|
||||
@@ -185,19 +176,6 @@
|
||||
[responder success:rootNode];
|
||||
}
|
||||
|
||||
- (void)populateAllNodesFromNode:(nonnull NSString*)identifier
|
||||
inDictionary:
|
||||
(nonnull NSMutableDictionary<NSString*, NSDictionary*>*)
|
||||
mutableDict {
|
||||
NSDictionary* nodeDict = [self getNode:identifier];
|
||||
mutableDict[identifier] = nodeDict;
|
||||
NSArray* arr = nodeDict[@"children"];
|
||||
for (NSString* childIdentifier in arr) {
|
||||
[self populateAllNodesFromNode:childIdentifier inDictionary:mutableDict];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
- (void)populateAllNodesFromNode:(nonnull NSString*)identifier
|
||||
inArray:(nonnull NSMutableArray<NSDictionary*>*)
|
||||
mutableArray {
|
||||
@@ -212,26 +190,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onCallGetAllNodesWithResponder:(nonnull id<FlipperResponder>)responder {
|
||||
NSMutableArray<NSDictionary*>* allNodes = @[].mutableCopy;
|
||||
NSString* identifier = [self trackObject:_rootNode];
|
||||
NSDictionary* rootNode = [self getNode:identifier];
|
||||
if (!rootNode) {
|
||||
return [responder error:@{
|
||||
@"error" : [NSString
|
||||
stringWithFormat:
|
||||
@"getNode returned nil for the rootNode %@, while getting all the nodes",
|
||||
identifier]
|
||||
}];
|
||||
}
|
||||
[allNodes addObject:rootNode];
|
||||
NSMutableDictionary* allNodesDict = @{}.mutableCopy;
|
||||
[self populateAllNodesFromNode:identifier inDictionary:allNodesDict];
|
||||
[responder success:@{
|
||||
@"allNodes" : @{@"rootElement" : identifier, @"elements" : allNodesDict}
|
||||
}];
|
||||
}
|
||||
|
||||
- (NSMutableArray*)getChildrenForNode:(id)node
|
||||
withDescriptor:(SKNodeDescriptor*)descriptor {
|
||||
NSMutableArray* children = [NSMutableArray new];
|
||||
|
||||
Reference in New Issue
Block a user