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:
Adam Ernst
2020-04-29 08:33:26 -07:00
committed by Facebook GitHub Bot
parent 60e9ebb4f1
commit affade67ff

View File

@@ -91,15 +91,6 @@
responder); responder);
}]; }];
[connection receive:@"getAllNodes"
withBlock:^(NSDictionary* params, id<FlipperResponder> responder) {
FlipperPerformBlockOnMainThread(
^{
[weakSelf onCallGetAllNodesWithResponder:responder];
},
responder);
}];
[connection receive:@"getNodes" [connection receive:@"getNodes"
withBlock:^(NSDictionary* params, id<FlipperResponder> responder) { withBlock:^(NSDictionary* params, id<FlipperResponder> responder) {
FlipperPerformBlockOnMainThread( FlipperPerformBlockOnMainThread(
@@ -185,19 +176,6 @@
[responder success:rootNode]; [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 - (void)populateAllNodesFromNode:(nonnull NSString*)identifier
inArray:(nonnull NSMutableArray<NSDictionary*>*) inArray:(nonnull NSMutableArray<NSDictionary*>*)
mutableArray { 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 - (NSMutableArray*)getChildrenForNode:(id)node
withDescriptor:(SKNodeDescriptor*)descriptor { withDescriptor:(SKNodeDescriptor*)descriptor {
NSMutableArray* children = [NSMutableArray new]; NSMutableArray* children = [NSMutableArray new];