From 93a564bf03812964e934d77bc29d5ca4fbdfceca Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 12 Feb 2024 00:04:35 -0600 Subject: [PATCH] Update uYouPlusSettings.xm --- Sources/uYouPlusSettings.xm | 51 ------------------------------------- 1 file changed, 51 deletions(-) diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index 114b5ee..d82fd8a 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -1,12 +1,10 @@ // Settings.xm made by the @therealFoxster -#import "../Tweaks/YouTubeHeader/YTSettingsGroupData.h" #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" #import "../Tweaks/YouTubeHeader/YTSettingsPickerViewController.h" -#import "../Tweaks/YouTubeHeader/YTIIcon.h" #import "ColourOptionsController.h" #import "ColourOptionsController2.h" #import "uYouPlus.h" @@ -39,11 +37,6 @@ static int appVersionSpoofer() { return [[NSUserDefaults standardUserDefaults] integerForKey:@"versionSpoofer"]; } static const NSInteger uYouPlusSection = 500; -static const NSUInteger GROUP_TYPE = 'psyt'; // PoomSmart/YouGroupSettings - -@interface YTSettingsGroupData (YouGroupSettings) // PoomSmart/YouGroupSettings -+ (NSMutableArray *)tweaks; -@end @interface YTSettingsSectionItemManager (uYouPlus) - (void)updateTweakSectionWithEntry:(id)entry; @@ -82,50 +75,6 @@ extern NSBundle *uYouPlusBundle(); } %end -// PoomSmart/YouGroupSettings -%hook YTSettingsGroupData -%new(@@:) -+ (NSMutableArray *)tweaks { - static NSMutableArray *tweaks = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - tweaks = [NSMutableArray new]; - [tweaks addObjectsFromArray:@[ - @(404), // YTABConfig - @(517), // DontEatMyContent - @(1080), // Return YouTube Dislike - @(200), // YouPiP - @(500), // uYouEnhanced / uYouPlus - @(2168), // YTHoldForSpeed - @(1222), // YTVideoOverlay - ]]; - }); - return tweaks; -} -- (NSString *)titleForSettingGroupType:(NSUInteger)type { - if (type == GROUP_TYPE) { - return @"Tweaks"; - } - return %orig; -} -- (NSArray *)orderedCategoriesForGroupType:(NSUInteger)type { - if (type == GROUP_TYPE) - return [[self class] tweaks]; - return %orig; -} -%end - -%hook YTSettingsViewController -- (void)setSectionItems:(NSMutableArray *)sectionItems forCategory:(NSInteger)category title:(NSString *)title icon:(YTIIcon *)icon titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden { - if (icon == nil && [[%c(YTSettingsGroupData) tweaks] containsObject:@(category)]) { - icon = [%c(YTIIcon) new]; - icon.iconType = 44; - } - %orig; -} -%end -// - %hook YTSettingsSectionController - (void)setSelectedItem:(NSUInteger)selectedItem { if (selectedItem != NSNotFound) %orig;