Skip to content

Commit

Permalink
Fix hiding buttons under video, Update YouTubeHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
PoomSmart committed Nov 16, 2024
1 parent 3415184 commit d92662d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Sources/uYouPlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,20 @@ NSBundle *tweakBundle = uYouPlusBundle();
// Hide useless buttons under the video player by @PoomSmart
static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *identifiers) {
for (id child in [nodeController children]) {
if ([child isKindOfClass:%c(ELMComponent)]) {
if ([[child templateURI] containsString:@"video_action_button_with_vm_input"])
return findCell([child materializedInstance], identifiers);
for (NSString *identifier in identifiers) {
if ([[child templateURI] containsString:identifier])
return YES;
}
}

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])
if ([[elmChild templateURI] containsString:identifier])
return YES;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tweaks/YouTubeHeader
Submodule YouTubeHeader updated 1 files
+4 −0 ELMComponent.h

0 comments on commit d92662d

Please sign in to comment.