Skip to content

Commit d95ea22

Browse files
Merge pull request #530 from bhackel/fix/fullscreen-actions
Fix hide fullscreen actions
2 parents 7967b96 + 99b5587 commit d95ea22

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Sources/uYouPlus.xm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,21 +554,21 @@ BOOL isAd(YTIElementRenderer *self) {
554554
%group hideFullscreenActions
555555
%hook YTMainAppVideoPlayerOverlayViewController
556556
- (BOOL)isFullscreenActionsEnabled {
557-
// This didn't work on its own - weird
558-
return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig;
557+
return NO;
559558
}
560559
%end
561560
%hook YTFullscreenActionsView
562561
- (BOOL)enabled {
563-
// Attempt 2
564-
return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig;
562+
return NO;
565563
}
566-
- (void)removeFromSuperview {
567-
// Attempt 3
568-
if (IS_ENABLED(@"hideFullscreenActions_enabled")) {
564+
- (void)layoutSubviews {
565+
// Check if already removed from superview
566+
if (self.superview) {
569567
[self removeFromSuperview];
570568
}
571-
%orig;
569+
self.hidden = YES;
570+
self.frame = CGRectZero;
571+
%orig;
572572
}
573573
%end
574574
%end

0 commit comments

Comments
 (0)