From 4875974037f958403123412de4b050c4d459c3a6 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sat, 6 Apr 2024 18:14:36 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9CHide=20Fullscreen=20Actions=20bu?= =?UTF-8?q?ttons=E2=80=9D=20Option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/uYouPlus.xm | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 1b6e8c5..043b093 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -550,20 +550,25 @@ BOOL isAd(YTIElementRenderer *self) { } %end -// Hide Fullscreen Actions buttons - @bhackel +// Hide Fullscreen Actions buttons - @bhackel & @arichornlover %group hideFullscreenActions - %hook YTMainAppVideoPlayerOverlayViewController - - (BOOL)isFullscreenActionsEnabled { - // This didn't work on its own - weird - return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; +%hook YTMainAppVideoPlayerOverlayViewController +- (BOOL)isFullscreenActionsEnabled { +// This didn't work on its own - weird + return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; +} +%end +%hook YTFullscreenActionsView +- (BOOL)enabled { +// Attempt 2 + return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; +} +- (void)removeFromSuperview { + if (IS_ENABLED(@"hideFullscreenActions_enabled")) { + [super removeFromSuperview]; } - %end - %hook YTFullscreenActionsView - - (BOOL)enabled { - // Attempt 2 - return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; - } - %end +} +%end %end # pragma mark - uYouPlus