Merge pull request #594 from arichorn/main-testing
uYouPlusSection Search Bar Support
This commit is contained in:
+21
@@ -1,4 +1,5 @@
|
|||||||
#import "Tweaks/YouTubeHeader/YTSettingsViewController.h"
|
#import "Tweaks/YouTubeHeader/YTSettingsViewController.h"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTSearchableSettingsViewController.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTSettingsSectionItemManager.h"
|
#import "Tweaks/YouTubeHeader/YTSettingsSectionItemManager.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTUIUtils.h"
|
#import "Tweaks/YouTubeHeader/YTUIUtils.h"
|
||||||
@@ -40,6 +41,26 @@ extern BOOL dontEatMyContent();
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook YTSettingsViewController
|
||||||
|
|
||||||
|
- (void)loadWithModel:(id)model fromView:(UIView *)view {
|
||||||
|
%orig;
|
||||||
|
if ([[self valueForKey:@"_detailsCategoryID"] integerValue] == uYouPlusSection)
|
||||||
|
MSHookIvar<BOOL>(self, "_shouldShowSearchBar") = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setSectionControllers {
|
||||||
|
%orig;
|
||||||
|
if (MSHookIvar<BOOL>(self, "_shouldShowSearchBar")) {
|
||||||
|
YTSettingsSectionController *settingsSectionController = [self settingsSectionControllers][[self valueForKey:@"_detailsCategoryID"]];
|
||||||
|
YTSearchableSettingsViewController *searchableVC = [self valueForKey:@"_searchableSettingsViewController"];
|
||||||
|
if (settingsSectionController)
|
||||||
|
[searchableVC storeCollectionViewSections:@[settingsSectionController]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%end
|
||||||
|
|
||||||
%hook YTSettingsSectionItemManager
|
%hook YTSettingsSectionItemManager
|
||||||
%new
|
%new
|
||||||
- (void)updateuYouPlusSectionWithEntry:(id)entry {
|
- (void)updateuYouPlusSectionWithEntry:(id)entry {
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ BOOL dontEatMyContent() {
|
|||||||
|
|
||||||
%hook YTColdConfig
|
%hook YTColdConfig
|
||||||
- (BOOL)iosEnableVideoPlayerScrubber { return YES; }
|
- (BOOL)iosEnableVideoPlayerScrubber { return YES; }
|
||||||
|
- (BOOL)mobileShortsTabInlined { return YES; }
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTHotConfig
|
%hook YTHotConfig
|
||||||
|
|||||||
Reference in New Issue
Block a user