Hide comment previews by @arichornlover

This commit is contained in:
Bryce Hackel
2024-08-09 16:34:57 -07:00
parent 948ea5ff29
commit 4f2b55a897
15 changed files with 74 additions and 0 deletions

View File

@@ -542,6 +542,25 @@ BOOL isTabSelected = NO;
}
%end
// Hide the Comment Section Previews under the Video Player - @arichornlover
%hook _ASDisplayView
- (void)didMoveToWindow {
%orig;
if ((IsEnabled(@"hidePreviewCommentSection_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"])) {
self.hidden = YES;
self.opaque = YES;
self.userInteractionEnabled = NO;
CGRect bounds = self.frame;
bounds.size.height = 0;
self.frame = bounds;
[self.superview layoutIfNeeded];
[self setNeedsLayout];
[self removeFromSuperview];
}
}
%end
// BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer
%group Main
%hook YTWatchMiniBarView