From bda66bf8dd0b286a8059d62ec18e165ab024bbbc Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Thu, 28 Mar 2024 03:10:51 -0700 Subject: [PATCH] Much better implementation --- Sources/uYouPlus.h | 6 ------ Sources/uYouPlus.xm | 12 ++++-------- Sources/uYouPlusSettings.xm | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index 09f5c32..6a162b3 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -51,12 +51,6 @@ @property (nonatomic, strong) UIView *_scrimOverlay; @end -// Hide fullscreen action buttons at the bottom = @bhackel -@interface YTFullscreenActionsView : UIView -@property (atomic, assign, readwrite, getter=isHidden) BOOL hidden; -@property (atomic, assign, readwrite) CGRect frame; -@end - // uYouPlus @interface YTHeaderLogoController : UIView @property(readonly, nonatomic) long long pageStyle; diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index cfc1795..f02edca 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -509,14 +509,10 @@ static NSString *accessGroupID() { } %end -// Hide fullscreen actions buttons at the bottom - @bhackel -%hook YTFullscreenActionsView -- (void)layoutSubviews { - %orig; - if (IS_ENABLED(@"hideFullscreenActions_enabled")) { - self.hidden = YES; - self.frame = CGRectZero; - } +// Hide fullscreen action buttons - @bhackel +%hook YTMainAppVideoPlayerOverlayViewController +- (BOOL)isFullscreenActionsEnabled { + return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; } %end diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index 75a4bfc..b5740fa 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -226,7 +226,7 @@ extern NSBundle *uYouPlusBundle(); SWITCH_ITEM2(LOC(@"RED_PROGRESS_BAR"), LOC(@"RED_PROGRESS_BAR_DESC"), @"redProgressBar_enabled"); SWITCH_ITEM(LOC(@"HIDE_HOVER_CARD"), LOC(@"HIDE_HOVER_CARD_DESC"), @"hideHoverCards_enabled"); SWITCH_ITEM2(LOC(@"HIDE_RIGHT_PANEL"), LOC(@"HIDE_RIGHT_PANEL_DESC"), @"hideRightPanel_enabled"); - SWITCH_ITEM2(LOC(@"Hide Fullscreen Action Buttons"), LOC(@"Hides the buttons at the bottom of the screen when in landscape"), @"hideFullscreenActions_enabled"); + SWITCH_ITEM(LOC(@"Hide Fullscreen Action Buttons"), LOC(@"Hides the buttons at the bottom of the screen when in landscape"), @"hideFullscreenActions_enabled"); SWITCH_ITEM2(LOC(@"Hide Suggested Video"), LOC(@"Remove the suggested video popup when finishing a video. Note that this will prevent autoplay from working."), @"noSuggestedVideo_enabled"); SWITCH_ITEM2(LOC(@"Hide Heatwaves"), LOC(@"Should hide the Heatwaves in the video player. App restart is required."), @"hideHeatwaves_enabled"); SWITCH_ITEM2(LOC(@"Hide Double Tap to Seek Overlay"), LOC(@"This hides the animated double tap to seek overlay in the video player. App restart is required."), @"hideDoubleTapToSeekOverlay_enabled");