From 97022cfce0f20c95fe66a9b1eaec2e5ee1d20f7a Mon Sep 17 00:00:00 2001 From: qnblackcat Date: Tue, 28 Feb 2023 16:57:48 +0700 Subject: [PATCH] more settings... --- Settings.xm | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/Settings.xm b/Settings.xm index fdb0f37..a6f066c 100644 --- a/Settings.xm +++ b/Settings.xm @@ -286,7 +286,17 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_UYOU_SHORTS_DOWNLOAD_BUTTON") + titleDescription:LOC(@"HIDE_UYOU_SHORTS_DOWNLOAD_BUTTON_DESC") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideuYouShortsDownloadButton_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideuYouShortsDownloadButton_enabled"]; + return YES; + } + settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"DISABLE_RESUME_TO_SHORTS") titleDescription:LOC(@"DISABLE_RESUME_TO_SHORTS_DESC") accessibilityIdentifier:nil @@ -384,12 +394,12 @@ extern NSBundle *uYouPlusBundle(); } settingItemId:0], - [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"FIX_GOOGLE_SIGNIN") - titleDescription:LOC(@"FIX_GOOGLE_SIGNIN_DESC") + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"ENABLE_YT_STARTUP_ANIMATION") + titleDescription:LOC(@"ENABLE_YT_STARTUP_ANIMATION_DESC") accessibilityIdentifier:nil - switchOn:IsEnabled(@"fixGoogleSignIn_enabled") + switchOn:IsEnabled(@"ytStartupAnimation_enabled") switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { - [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"fixGoogleSignIn_enabled"]; + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"ytStartupAnimation_enabled"]; return YES; } settingItemId:0], @@ -404,6 +414,16 @@ extern NSBundle *uYouPlusBundle(); } settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"IPHONE_LAYOUT") + titleDescription:LOC(@"IPHONE_LAYOUT_DESC") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"iPhoneLayout_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"iPhoneLayout_enabled"]; + return YES; + } + settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"NEW_MINIPLAYER_STYLE") titleDescription:LOC(@"NEW_MINIPLAYER_STYLE_DESC") accessibilityIdentifier:nil @@ -424,20 +444,6 @@ extern NSBundle *uYouPlusBundle(); } settingItemId:0], ]; - - if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) { - YTSettingsSectionItem *ipadItem = [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"IPHONE_LAYOUT") - titleDescription:LOC(@"IPHONE_LAYOUT_DESC") - accessibilityIdentifier:nil - switchOn:IsEnabled(@"iPhoneLayout_enabled") - switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { - [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"iPhoneLayout_enabled"]; - return YES; - } - settingItemId:0]; - - rows = [rows arrayByAddingObject:ipadItem]; - } YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"MISCELLANEOUS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker];