Skip to content

Commit

Permalink
Update uYouPlus.xm
Browse files Browse the repository at this point in the history
  • Loading branch information
cameren2k authored Mar 20, 2024
1 parent bad9d56 commit ddd6ed4
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions Sources/uYouPlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -96,34 +96,6 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
}
%end

static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *identifiers) {
for (id child in [nodeController children]) {
if ([child isKindOfClass:%c(ELMNodeController)]) {
NSArray <ELMComponent *> *elmChildren = [(ELMNodeController *)child children];
for (ELMComponent *elmChild in elmChildren) {
for (NSString *identifier in identifiers) {
if ([[elmChild description] containsString:identifier])
return YES;
}
}
}

if ([child isKindOfClass:%c(ASNodeController)]) {
ASDisplayNode *childNode = ((ASNodeController *)child).node; // ELMContainerNode
NSArray *yogaChildren = childNode.yogaChildren;
for (ASDisplayNode *displayNode in yogaChildren) {
if ([identifiers containsObject:displayNode.accessibilityIdentifier])
return YES;
}

return findCell(child, identifiers);
}

return NO;
}
return NO;
}

%hook ASCollectionView

- (CGSize)sizeForElement:(ASCollectionElement *)element {
Expand Down

0 comments on commit ddd6ed4

Please sign in to comment.