From 12a32903507009055990f190cca57fd35c0dd1ed Mon Sep 17 00:00:00 2001 From: Aric <78001398+arichorn@users.noreply.github.com> Date: Wed, 19 Oct 2022 15:46:57 -0500 Subject: [PATCH 1/2] Added Settings Search Bar --- Settings.xm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Settings.xm b/Settings.xm index f4b7eb9..708e26b 100644 --- a/Settings.xm +++ b/Settings.xm @@ -1,4 +1,5 @@ #import "Tweaks/YouTubeHeader/YTSettingsViewController.h" +#import "Tweaks/YouTubeHeader/YTSearchableSettingsViewController.h" #import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h" #import "Tweaks/YouTubeHeader/YTSettingsSectionItemManager.h" #import "Tweaks/YouTubeHeader/YTUIUtils.h" @@ -40,6 +41,26 @@ extern BOOL dontEatMyContent(); } %end +%hook YTSettingsViewController + +- (void)loadWithModel:(id)model fromView:(UIView *)view { + %orig; + if ([[self valueForKey:@"_detailsCategoryID"] integerValue] == uYouPlusSection) + MSHookIvar(self, "_shouldShowSearchBar") = YES; +} + +- (void)setSectionControllers { + %orig; + if (MSHookIvar(self, "_shouldShowSearchBar")) { + YTSettingsSectionController *settingsSectionController = [self settingsSectionControllers][[self valueForKey:@"_detailsCategoryID"]]; + YTSearchableSettingsViewController *searchableVC = [self valueForKey:@"_searchableSettingsViewController"]; + if (settingsSectionController) + [searchableVC storeCollectionViewSections:@[settingsSectionController]]; + } +} + +%end + %hook YTSettingsSectionItemManager %new - (void)updateuYouPlusSectionWithEntry:(id)entry { From eefb55463172f2ac2645c03ea65f7a8090162a97 Mon Sep 17 00:00:00 2001 From: Aric <78001398+arichorn@users.noreply.github.com> Date: Thu, 20 Oct 2022 22:42:51 -0500 Subject: [PATCH 2/2] Improvements on Shorts Bar --- uYouPlus.xm | 1 + 1 file changed, 1 insertion(+) diff --git a/uYouPlus.xm b/uYouPlus.xm index e56c8ba..3e725ab 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -319,6 +319,7 @@ BOOL dontEatMyContent() { %hook YTColdConfig - (BOOL)iosEnableVideoPlayerScrubber { return YES; } +- (BOOL)mobileShortsTabInlined { return YES; } %end %hook YTHotConfig