From 39781009723bbbb1c87d2863455fe146ff57d61f Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Thu, 4 Jul 2024 06:42:42 -0500 Subject: [PATCH] Updated `Hide Fullscreen Button` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a replacement since the previous implementation breaks PoomSmart’s 1.2.0+ YouQuality tweak. --- Sources/uYouPlus.xm | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 91a3465..6ccf1dc 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -682,8 +682,6 @@ static int contrastMode() { - (BOOL)showModernMiniplayerRedesign { return NO; } - (BOOL)uiSystemsClientGlobalConfigEnableModernButtonsForNative { return NO; } - (BOOL)uiSystemsClientGlobalConfigIosEnableModernTabsForNative { return NO; } -- (BOOL)uiSystemsClientGlobalConfigIosEnableEpUxUpdates { return NO; } // Deprecated -- (BOOL)uiSystemsClientGlobalConfigIosEnableSheetsUxUpdates { return NO; } // Deprecated - (BOOL)uiSystemsClientGlobalConfigIosEnableSnackbarModernization { return NO; } - (BOOL)uiSystemsClientGlobalConfigModernizeNativeBgColor { return NO; } - (BOOL)uiSystemsClientGlobalConfigModernizeNativeTextColor { return NO; } @@ -1041,8 +1039,9 @@ static int contrastMode() { } %end +/* // LEGACY VERSION ⚠️ -// Hide Fullscreen Button - @arichornlover - PoomSmart's Newer Version of the *YouQuality* tweak breaks when enabling this +// Hide Fullscreen Button - @arichornlover - PoomSmart's 1.2.0+ Versions of the *YouQuality* tweak makes the button invisible when enabling this %hook YTInlinePlayerBarContainerView - (void)layoutSubviews { %orig; @@ -1059,15 +1058,18 @@ static int contrastMode() { } } %end +*/ // NEW VERSION -// Hide Fullscreen Button - @arichornlover - UNTESTED! -// %hook YTInlinePlayerBarContainerView -// - (BOOL)fullscreenButtonDisabled { return YES; } -// - (BOOL)canShowFullscreenButton { return NO; } -// - (BOOL)canShowFullscreenButtonExperimental { return NO; } -// - (void)setFullscreenButtonDisabled:(BOOL) // this line should remain disabled for now. -// %end +// Hide Fullscreen Button - @arichornlover +%group gHideFullscreenButton +%hook YTInlinePlayerBarContainerView +- (BOOL)fullscreenButtonDisabled { return YES; } +- (BOOL)canShowFullscreenButton { return NO; } +- (BOOL)canShowFullscreenButtonExperimental { return NO; } +// - (void)setFullscreenButtonDisabled:(BOOL) // Uncomment and might implement this if needed - @arichornlover +%end +%end // Hide HUD Messages %hook YTHUDMessageView @@ -1674,6 +1676,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide if (IS_ENABLED(@"portraitFullscreen_enabled")) { %init(gPortraitFullscreen); } + if (IS_ENABLED(@"disableFullscreenButton_enabled")) { + %init(gHideFullscreenButton); + } if (IS_ENABLED(@"hideFullscreenActions_enabled")) { %init(hideFullscreenActions); }