more settings...

This commit is contained in:
qnblackcat 2023-02-28 16:57:48 +07:00
parent a0fe2f8cc3
commit 97022cfce0

View file

@ -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];