mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 03:32:08 +00:00
Define Switch_item 3 & 4
Smarter way I believe?
This commit is contained in:
parent
1ff93b4a4d
commit
d0df045e1b
1 changed files with 5 additions and 4 deletions
|
|
@ -16,6 +16,10 @@
|
||||||
|
|
||||||
#define SWITCH_ITEM2(t, d, k) [sectionItems addObject:[YTSettingsSectionItemClass switchItemWithTitle:t titleDescription:d accessibilityIdentifier:nil switchOn:IS_ENABLED(k) switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:k];SHOW_RELAUNCH_YT_SNACKBAR;return YES;} settingItemId:0
|
#define SWITCH_ITEM2(t, d, k) [sectionItems addObject:[YTSettingsSectionItemClass switchItemWithTitle:t titleDescription:d accessibilityIdentifier:nil switchOn:IS_ENABLED(k) switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:k];SHOW_RELAUNCH_YT_SNACKBAR;return YES;} settingItemId:0
|
||||||
|
|
||||||
|
#define SWITCH_ITEM3(t, d, k) [lowContrastModeSection.sectionItems addObject:[YTSettingsSectionItemClass switchItemWithTitle:t titleDescription:d accessibilityIdentifier:nil switchOn:IS_ENABLED(k) switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:k];SHOW_RELAUNCH_YT_SNACKBAR;return YES;} settingItemId:0]]
|
||||||
|
|
||||||
|
#define SWITCH_ITEM4(t, d, k) [versionSpooferSection.sectionItems addObject:[YTSettingsSectionItemClass switchItemWithTitle:t titleDescription:d accessibilityIdentifier:nil switchOn:IS_ENABLED(k) switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:k];SHOW_RELAUNCH_YT_SNACKBAR;return YES;} settingItemId:0]]
|
||||||
|
|
||||||
static int GetSelection(NSString *key) {
|
static int GetSelection(NSString *key) {
|
||||||
return [[NSUserDefaults standardUserDefaults] integerForKey:key];
|
return [[NSUserDefaults standardUserDefaults] integerForKey:key];
|
||||||
}
|
}
|
||||||
|
|
@ -254,7 +258,6 @@ extern NSBundle *uYouPlusBundle();
|
||||||
SWITCH_ITEM2(LOC(@"Hide `Privacy` Section"), LOC(@"App restart is required."), @"disablePrivacySection_enabled");
|
SWITCH_ITEM2(LOC(@"Hide `Privacy` Section"), LOC(@"App restart is required."), @"disablePrivacySection_enabled");
|
||||||
SWITCH_ITEM2(LOC(@"Hide `Live Chat` Section"), LOC(@"App restart is required."), @"disableLiveChatSection_enabled");
|
SWITCH_ITEM2(LOC(@"Hide `Live Chat` Section"), LOC(@"App restart is required."), @"disableLiveChatSection_enabled");
|
||||||
|
|
||||||
/*
|
|
||||||
# pragma mark - LowContrastMode
|
# pragma mark - LowContrastMode
|
||||||
YTSettingsSectionItem *lowContrastModeSection = [YTSettingsSectionItemClass itemWithTitle:LOC(@"Low Contrast Mode")
|
YTSettingsSectionItem *lowContrastModeSection = [YTSettingsSectionItemClass itemWithTitle:LOC(@"Low Contrast Mode")
|
||||||
accessibilityIdentifier:nil
|
accessibilityIdentifier:nil
|
||||||
|
|
@ -285,7 +288,6 @@ extern NSBundle *uYouPlusBundle();
|
||||||
[settingsViewController pushViewController:picker];
|
[settingsViewController pushViewController:picker];
|
||||||
return YES;
|
return YES;
|
||||||
}];
|
}];
|
||||||
*/
|
|
||||||
|
|
||||||
# pragma mark - VersionSpoofer
|
# pragma mark - VersionSpoofer
|
||||||
YTSettingsSectionItem *versionSpooferSection = [YTSettingsSectionItemClass itemWithTitle:LOC(@"Version Spoofer Picker")
|
YTSettingsSectionItem *versionSpooferSection = [YTSettingsSectionItemClass itemWithTitle:LOC(@"Version Spoofer Picker")
|
||||||
|
|
@ -1032,8 +1034,7 @@ extern NSBundle *uYouPlusBundle();
|
||||||
SWITCH_ITEM2(LOC(@"Disable Rounded Corners on Hints"), LOC(@"This will make the Hints in the App to not have Rounded Corners. App restart is required."), @"disableRoundedHints_enabled");
|
SWITCH_ITEM2(LOC(@"Disable Rounded Corners on Hints"), LOC(@"This will make the Hints in the App to not have Rounded Corners. App restart is required."), @"disableRoundedHints_enabled");
|
||||||
SWITCH_ITEM2(LOC(@"Disable Modern A/B Flags"), LOC(@"This will turn off any Modern Flag that was enabled by default. App restart is required."), @"disableModernFlags_enabled");
|
SWITCH_ITEM2(LOC(@"Disable Modern A/B Flags"), LOC(@"This will turn off any Modern Flag that was enabled by default. App restart is required."), @"disableModernFlags_enabled");
|
||||||
SWITCH_ITEM2(LOC(@"Enable All Options Above (YTNoModernUI)"), LOC(@"When Enabled, this will enable the options above. App restart is required."), @"ytNoModernUI_enabled");
|
SWITCH_ITEM2(LOC(@"Enable All Options Above (YTNoModernUI)"), LOC(@"When Enabled, this will enable the options above. App restart is required."), @"ytNoModernUI_enabled");
|
||||||
// (versionSpooferSection is missing below. without it, you can't select and spoof the app correctly.)
|
SWITCH_ITEM2(LOC(@"Enable App Version Spoofer"), LOC(@"Enable this to use the Version Spoofer and select your perferred version below. App restart is required."), @"enableVersionSpoofer_enabled"); versionSpooferSection
|
||||||
// SWITCH_ITEM2(LOC(@"Enable App Version Spoofer"), LOC(@"Enable this to use the Version Spoofer and select your perferred version below. App restart is required."), @"enableVersionSpoofer_enabled");
|
|
||||||
|
|
||||||
/* Legacy Version (App Version Spoofer Option)
|
/* Legacy Version (App Version Spoofer Option)
|
||||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Enable App Version Spoofer")
|
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Enable App Version Spoofer")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue