Skip to content

Commit

Permalink
Updated Code for settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
arichornlover authored Dec 9, 2022
1 parent 4694d5c commit 7f01d6c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Settings.xm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extern BOOL lowContrastMode();
extern BOOL RedUI();
extern BOOL BlueUI();
extern BOOL GreenUI();
extern BOOL YellowUI();
extern BOOL OrangeUI();
extern BOOL PurpleUI();
extern BOOL PinkUI();
Expand Down Expand Up @@ -116,6 +117,15 @@ extern BOOL PinkUI();
return YES;
};

YTSettingsSectionItem *YellowUI = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Yellow UI" titleDescription:@"Yellow UI (have every other ui colors off) App restart is required."];
YellowUI.hasSwitch = YES;
YellowUI.switchVisible = YES;
YellowUI.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"YellowUI_enabled"];
YellowUI.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"YellowUI_enabled"];
return YES;
};

YTSettingsSectionItem *GreenUI = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Green UI" titleDescription:@"Green UI (have every other ui colors off) App restart is required."];
GreenUI.hasSwitch = YES;
GreenUI.switchVisible = YES;
Expand Down Expand Up @@ -350,7 +360,7 @@ extern BOOL PinkUI();
return YES;
};

NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[version, autoFull, ytMiniPlayer, fixGoogleSignIn, hideAutoplaySwitch, hideCercubeButton, hideCercubePiP, hideCercubeDownload, hideCastButton, hideCC, hideHUD, hideHoverCard, hideNotificationButton, hideShorts, hidePaidPromotionCard, hidePreviousAndNextButton, hideWatermarks, bigYTMiniPlayer, oledDarkMode, oledKeyBoard, dontEatMyContent, replacePreviousAndNextButton, reExplore, lowContrastMode, RedUI, BlueUI, GreenUI, OrangeUI, PurpleUI, PinkUI]];
NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[version, autoFull, ytMiniPlayer, fixGoogleSignIn, hideAutoplaySwitch, hideCercubeButton, hideCercubePiP, hideCercubeDownload, hideCastButton, hideCC, hideHUD, hideHoverCard, hideNotificationButton, hideShorts, hidePaidPromotionCard, hidePreviousAndNextButton, hideWatermarks, bigYTMiniPlayer, oledDarkMode, oledKeyBoard, dontEatMyContent, replacePreviousAndNextButton, reExplore, lowContrastMode, RedUI, BlueUI, GreenUI, YellowUI, OrangeUI, PurpleUI, PinkUI]];
[delegate setSectionItems:sectionItems forCategory:CercubePlusSection title:@"CercubePlus" titleDescription:nil headerHidden:NO];
}

Expand Down

0 comments on commit 7f01d6c

Please sign in to comment.