mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +00:00
add toggle to hide play next in queue
This commit is contained in:
parent
8f1d16746f
commit
687d0e7d10
4 changed files with 20 additions and 1 deletions
10
Settings.xm
10
Settings.xm
|
|
@ -365,6 +365,16 @@ extern NSBundle *uYouPlusBundle();
|
|||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_PLAY_NEXT_IN_QUEUE")
|
||||
titleDescription:LOC(@"HIDE_PLAY_NEXT_IN_QUEUE_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
switchOn:IsEnabled(@"hidePlayNextInQueue_enabled")
|
||||
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hidePlayNextInQueue_enabled"];
|
||||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"IPHONE_LAYOUT")
|
||||
titleDescription:LOC(@"IPHONE_LAYOUT_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
|
|
|
|||
|
|
@ -130,6 +130,9 @@
|
|||
"HIDE_CHIP_BAR" = "Hide the Upper bar";
|
||||
"HIDE_CHIP_BAR_DESC" = "Hide Upper bar in the Home feeds (Trends, Music, Gaming...) and Subscription feeds (All videos, Continue watching...).";
|
||||
|
||||
"HIDE_PLAY_NEXT_IN_QUEUE" = "Hide \"Play next in queue\"";
|
||||
"HIDE_PLAY_NEXT_IN_QUEUE_DESC" = "Hide the premium \"Play next in queue\" option in video context menus";
|
||||
|
||||
"NEW_MINIPLAYER_STYLE" = "New mini player bar style (BigYTMiniPlayer)";
|
||||
"NEW_MINIPLAYER_STYLE_DESC" = "App restart is required.";
|
||||
|
||||
|
|
|
|||
|
|
@ -145,6 +145,9 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
|
|||
"HIDE_CHIP_BAR" = "Hide the Upper bar";
|
||||
"HIDE_CHIP_BAR_DESC" = "Hide Upper bar in the Home feeds (Trends, Music, Gaming...) and Subscription feeds (All videos, Continue watching...).";
|
||||
|
||||
"HIDE_PLAY_NEXT_IN_QUEUE" = "Hide \"Play next in queue\"";
|
||||
"HIDE_PLAY_NEXT_IN_QUEUE_DESC" = "Hide the premium \"Play next in queue\" option in video context menus";
|
||||
|
||||
"NEW_MINIPLAYER_STYLE" = "New mini player bar style (BigYTMiniPlayer)";
|
||||
"NEW_MINIPLAYER_STYLE_DESC" = "App restart is required.";
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ static BOOL oldDarkTheme() {
|
|||
// Remove “Play next in queue” from the menu (@PoomSmart) - qnblackcat/uYouPlus#1138
|
||||
%hook YTMenuItemVisibilityHandler
|
||||
- (BOOL)shouldShowServiceItemRenderer:(YTIMenuConditionalServiceItemRenderer *)renderer {
|
||||
return renderer.icon.iconType == 251 ? NO : %orig;
|
||||
return IsEnabled(@"hidePlayNextInQueue_enabled") && renderer.icon.iconType == 251 ? NO : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
|
|
@ -1027,6 +1027,9 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||
|
||||
// Change the default value of some options
|
||||
NSArray *allKeys = [[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys];
|
||||
if (![allKeys containsObject:@"hidePlayNextInQueue_enabled"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"hidePlayNextInQueue_enabled"];
|
||||
}
|
||||
if (![allKeys containsObject:@"relatedVideosAtTheEndOfYTVideos"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"relatedVideosAtTheEndOfYTVideos"];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue