mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 16:02:00 +00:00
fix crash on iPad cz i'm suck
This commit is contained in:
parent
32bd36c423
commit
702406f87f
1 changed files with 39 additions and 39 deletions
70
uYouPlus.xm
70
uYouPlus.xm
|
|
@ -61,17 +61,37 @@ BOOL bigYTMiniPlayer() {
|
|||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hover_cards_enabled"];
|
||||
return YES;
|
||||
};
|
||||
[sectionItems insertObject:hoverCardItem atIndex:statsForNerdsIndex + 2];
|
||||
[sectionItems insertObject:hoverCardItem atIndex:statsForNerdsIndex + 1];
|
||||
//
|
||||
YTSettingsSectionItem *Oleditem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"OLED Dark mode (Experimental)" titleDescription:@"WARNING: You must set YouTube's appearance to Dark theme before enabling OLED dark mode (not tested on iPad yet). App restart is required."];
|
||||
Oleditem.hasSwitch = YES;
|
||||
Oleditem.switchVisible = YES;
|
||||
Oleditem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
||||
Oleditem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"oled_enabled"];
|
||||
YTSettingsSectionItem *reExplore = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Replace Shorts tab with Explore tab (YTReExplore)" titleDescription:@"App restart is required."];
|
||||
reExplore.hasSwitch = YES;
|
||||
reExplore.switchVisible = YES;
|
||||
reExplore.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"reExplore_enabled"];
|
||||
reExplore.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"reExplore_enabled"];
|
||||
return YES;
|
||||
};
|
||||
[sectionItems insertObject:Oleditem atIndex:statsForNerdsIndex - 11];
|
||||
[sectionItems insertObject:reExplore atIndex:statsForNerdsIndex + 2];
|
||||
//
|
||||
YTSettingsSectionItem *bigYTMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Bigger miniplayer bar (BigYTMiniPlayer)" titleDescription:@"App restart is required."];
|
||||
bigYTMiniPlayer.hasSwitch = YES;
|
||||
bigYTMiniPlayer.switchVisible = YES;
|
||||
bigYTMiniPlayer.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"bigYTMiniPlayer_enabled"];
|
||||
bigYTMiniPlayer.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"bigYTMiniPlayer_enabled"];
|
||||
return YES;
|
||||
};
|
||||
[sectionItems insertObject:bigYTMiniPlayer atIndex:statsForNerdsIndex + 2];
|
||||
//
|
||||
YTSettingsSectionItem *hideHUD = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide HUD Messages" titleDescription:@"Example: CC is turned on/off, Video loop is on,... App restart is required."];
|
||||
hideHUD.hasSwitch = YES;
|
||||
hideHUD.switchVisible = YES;
|
||||
hideHUD.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||
hideHUD.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideHUD_enabled"];
|
||||
return YES;
|
||||
};
|
||||
[sectionItems insertObject:hideHUD atIndex:statsForNerdsIndex + 1];
|
||||
//
|
||||
YTSettingsSectionItem *autoFUll = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Auto Full Screen (YTAutoFullScreen)" titleDescription:@"Autoplay videos at full screen."];
|
||||
autoFUll.hasSwitch = YES;
|
||||
|
|
@ -83,35 +103,15 @@ BOOL bigYTMiniPlayer() {
|
|||
};
|
||||
[sectionItems insertObject:autoFUll atIndex:statsForNerdsIndex + 2];
|
||||
//
|
||||
YTSettingsSectionItem *hideHUD = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide HUD Messages" titleDescription:@"Example: CC is turned on/off, Video loop is on,... App restart is required."];
|
||||
hideHUD.hasSwitch = YES;
|
||||
hideHUD.switchVisible = YES;
|
||||
hideHUD.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||
hideHUD.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideHUD_enabled"];
|
||||
YTSettingsSectionItem *Oleditem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"OLED Dark mode (Experimental)" titleDescription:@"WARNING: You must set YouTube's appearance to Dark theme before enabling OLED dark mode (not tested on iPad yet). App restart is required."];
|
||||
Oleditem.hasSwitch = YES;
|
||||
Oleditem.switchVisible = YES;
|
||||
Oleditem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
||||
Oleditem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"oled_enabled"];
|
||||
return YES;
|
||||
};
|
||||
[sectionItems insertObject:hideHUD atIndex:statsForNerdsIndex + 2];
|
||||
//
|
||||
YTSettingsSectionItem *reExplore = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Replace Shorts tab with Explore tab (YTReExplore)" titleDescription:@"App restart is required."];
|
||||
reExplore.hasSwitch = YES;
|
||||
reExplore.switchVisible = YES;
|
||||
reExplore.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"reExplore_enabled"];
|
||||
reExplore.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"reExplore_enabled"];
|
||||
return YES;
|
||||
};
|
||||
[sectionItems insertObject:reExplore atIndex:statsForNerdsIndex + 4];
|
||||
//
|
||||
YTSettingsSectionItem *bigYTMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Bigger miniplayer bar (BigYTMiniPlayer)" titleDescription:@"App restart is required."];
|
||||
bigYTMiniPlayer.hasSwitch = YES;
|
||||
bigYTMiniPlayer.switchVisible = YES;
|
||||
bigYTMiniPlayer.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"bigYTMiniPlayer_enabled"];
|
||||
bigYTMiniPlayer.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"bigYTMiniPlayer_enabled"];
|
||||
return YES;
|
||||
};
|
||||
[sectionItems insertObject:bigYTMiniPlayer atIndex:statsForNerdsIndex + 4];
|
||||
[sectionItems insertObject:Oleditem atIndex:statsForNerdsIndex + 1];
|
||||
}
|
||||
}
|
||||
%orig;
|
||||
|
|
|
|||
Loading…
Reference in a new issue