From 0ea0f44eda14ded85dec72c61772530ac0ab7423 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:18:35 -0700 Subject: [PATCH] Add toggle to disable "pull to full" --- Sources/uYouPlus.xm | 13 +++++++++++++ Sources/uYouPlusSettings.xm | 1 + 2 files changed, 14 insertions(+) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 2b9f92f..251e9d3 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -646,6 +646,16 @@ BOOL isAd(YTIElementRenderer *self) { } %end +// Disable pull to enter vertical fullscreen gesture - @bhackel +// This was introduced in version 19.XX +%group gDisablePullToFull +%hook YTColdConfig +- (BOOL)enablePullToFull { return NO; } +- (BOOL)enablePullToFullAlwaysExitFullscreenLandscape { return NO; } +%end +%end + + // Video Controls Overlay Options // Hide CC / Hide Autoplay switch / Hide YTMusic Button / Enable Share Button / Enable Save to Playlist Button %hook YTMainAppControlsOverlayView @@ -1378,6 +1388,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide if (IS_ENABLED(@"YTTapToSeek_enabled")) { %init(YTTTS_Tweak); } + if (IS_ENABLED(@"disablePullToFull_enabled")) { + %init(gDisablePullToFull); + } // YTNoModernUI - @arichorn BOOL ytNoModernUIEnabled = IS_ENABLED(@"ytNoModernUI_enabled"); diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index 33d3916..92c113e 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -229,6 +229,7 @@ extern NSBundle *uYouPlusBundle(); SWITCH_ITEM2(LOC(@"PINCH_TO_ZOOM"), LOC(@"PINCH_TO_ZOOM_DESC"), @"pinchToZoom_enabled"); SWITCH_ITEM(LOC(@"YT_MINIPLAYER"), LOC(@"YT_MINIPLAYER_DESC"), @"ytMiniPlayer_enabled"); SWITCH_ITEM2(LOC(@"STOCK_VOLUME_HUD"), LOC(@"STOCK_VOLUME_HUD_DESC"), @"stockVolumeHUD_enabled"); + SWITCH_ITEM2(LOC(@"Disable portrait fullscreen gesture"), LOC(@"Disable the drag gesture to enter vertical fullscreen"), @"disablePullToFull_enabled"); # pragma mark - Video controls overlay options SECTION_HEADER(LOC(@"VIDEO_PLAYER_OPTIONS"));