mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-19 05:42:10 +00:00
Updated “Hide Related Videos” Option #155
This commit is contained in:
parent
2c063e85a9
commit
d870bb5123
1 changed files with 24 additions and 1 deletions
25
uYouPlus.xm
25
uYouPlus.xm
|
|
@ -750,7 +750,7 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
// Hide the Comment Section under the Video Player - @arichorn
|
||||
// Hide the Comment Section under the Video Player (1) - @arichorn
|
||||
if ((IsEnabled(@"hideCommentSection_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"] || [self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_simplebox"] || [self.accessibilityIdentifier isEqualToString:@"id.ui.video_metadata_carousel"] || [self.accessibilityIdentifier isEqualToString:@"id.ui.carousel_header"])) {
|
||||
self.hidden = YES;
|
||||
self.opaque = YES;
|
||||
|
|
@ -784,6 +784,11 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
|
||||
NSString *result = [[[[asCell node] accessibilityElements] valueForKey:@"description"] componentsJoinedByString:@""];
|
||||
|
||||
// Hide the Comment Section under the Video Player (2) - @arichorn
|
||||
if (IsEnabled(@"hideCommentSection_enabled") && [result rangeOfString:@"id.ui.comments_entry_point_teaser"].location != NSNotFound) {
|
||||
[self deleteItemsAtIndexPaths:@[indexPath]];
|
||||
}
|
||||
|
||||
// Hide Community Posts - @arichorn
|
||||
if (IsEnabled(@"hideCommunityPosts_enabled") && [result rangeOfString:@"id.ui.backstage.post"].location != NSNotFound) {
|
||||
[self deleteItemsAtIndexPaths:@[indexPath]];
|
||||
|
|
@ -992,6 +997,24 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
%orig(arg1);
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTFullScreenEngagementOverlayView
|
||||
- (void)setRelatedVideosView:(id)view {
|
||||
}
|
||||
- (void)updateRelatedVideosViewSafeAreaInsets {
|
||||
}
|
||||
- (id)relatedVideosView {
|
||||
return nil;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTFullScreenEngagementOverlayViewController
|
||||
- (void)setRelatedVideosVisible:(BOOL)visible {
|
||||
}
|
||||
- (BOOL)relatedVideosPeekingEnabled {
|
||||
return NO;
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// iPhone Layout - @LillieH1000 & @arichorn
|
||||
|
|
|
|||
Loading…
Reference in a new issue