mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +00:00
only show the option on iPad
This commit is contained in:
parent
7139db47bc
commit
c7be5fa51a
1 changed files with 19 additions and 15 deletions
34
Settings.xm
34
Settings.xm
|
|
@ -92,7 +92,7 @@ extern NSBundle *uYouPlusBundle();
|
|||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
];
|
||||
];
|
||||
YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"VIDEO_PLAYER_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]];
|
||||
[settingsViewController pushViewController:picker];
|
||||
return YES;
|
||||
|
|
@ -211,8 +211,7 @@ extern NSBundle *uYouPlusBundle();
|
|||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
||||
];
|
||||
];
|
||||
YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"VIDEO_CONTROLS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]];
|
||||
[settingsViewController pushViewController:picker];
|
||||
return YES;
|
||||
|
|
@ -291,7 +290,7 @@ extern NSBundle *uYouPlusBundle();
|
|||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
];
|
||||
];
|
||||
YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"SHORTS_CONTROLS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]];
|
||||
[settingsViewController pushViewController:picker];
|
||||
return YES;
|
||||
|
|
@ -398,16 +397,6 @@ extern NSBundle *uYouPlusBundle();
|
|||
return YES;
|
||||
}
|
||||
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")
|
||||
|
|
@ -428,7 +417,22 @@ extern NSBundle *uYouPlusBundle();
|
|||
return YES;
|
||||
}
|
||||
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];
|
||||
return YES;
|
||||
|
|
|
|||
Loading…
Reference in a new issue