Skip to content

Commit

Permalink
Update Tweak.xm
Browse files Browse the repository at this point in the history
  • Loading branch information
arichornlover authored Oct 9, 2023
1 parent bb9ac70 commit de3fc05
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Tweak.xm
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#import "Tweak.h"

%group gLowContrastMode // Low Contrast Mode v1.4.2
%hook YTSettingsViewController
- (void)setSectionItems:(NSMutableArray <YTSettingsSectionItem *> *)sectionItems forCategory:(NSInteger)category title:(NSString *)title titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden {
- (void)setSectionItems:(NSMutableArray<YTSettingsSectionItem *> *)sectionItems forCategory:(NSInteger)category title:(NSString *)title titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden {
if (category == 1) {
YTSettingsSectionItem *lowContrastMode = [[YTSettingsSectionItem alloc] initWithTitle:@"Low Contrast Mode"
titleDescription:@"Enable to make the app easier on the eyes. App restart is required."];
YTSettingsSectionItem *lowContrastMode = [[YTSettingsSectionItem alloc] initWithTitle:@"Low Contrast Mode" titleDescription:@"Enable to make the app easier on the eyes. App restart is required."];
lowContrastMode.hasSwitch = YES;
lowContrastMode.switchVisible = YES;
lowContrastMode.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"low_contrast_mode"];
lowContrastMode.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
lowContrastMode.switchBlock = ^BOOL(YTSettingsCell *cell, BOOL enabled) {
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"low_contrast_mode"];
return YES;
};
Expand All @@ -18,7 +18,6 @@
}
%end

%group gLowContrastMode // Low Contrast Mode v1.4.2
%hook UIColor
+ (UIColor *)whiteColor { // Dark Theme Color
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
Expand Down

0 comments on commit de3fc05

Please sign in to comment.