Remove duplicates - uYouPlus.xm

This commit is contained in:
arichornlover 2024-02-08 18:37:17 -06:00 committed by GitHub
parent fdf9d2254c
commit 82baaeb8bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1094,31 +1094,6 @@ static NSString *accessGroupID() {
%end
%end
// BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer
%group Main
%hook YTWatchMiniBarView
- (void)setWatchMiniPlayerLayout:(int)arg1 {
%orig(1);
}
- (int)watchMiniPlayerLayout {
return 1;
}
- (void)layoutSubviews {
%orig;
self.frame = CGRectMake(([UIScreen mainScreen].bounds.size.width - self.frame.size.width), self.frame.origin.y, self.frame.size.width, self.frame.size.height);
}
%end
%hook YTMainAppVideoPlayerOverlayView
- (BOOL)isUserInteractionEnabled {
if([[self _viewControllerForAncestor].parentViewController.parentViewController isKindOfClass:%c(YTWatchMiniBarViewController)]) {
return NO;
}
return %orig;
}
%end
%end
// Hide Indicators - @Dayanch96 & @arichorn
%group gHideSubscriptionsNotificationBadge
%hook YTPivotBarIndicatorView
@ -1150,9 +1125,6 @@ static NSString *accessGroupID() {
if (IS_ENABLED(@"premiumYouTubeLogo_enabled")) {
%init(gPremiumYouTubeLogo);
}
if (IS_ENABLED(@"bigYTMiniPlayer_enabled") && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
%init(Main);
}
if (IS_ENABLED(@"hideSubscriptionsNotificationBadge_enabled")) {
%init(gHideSubscriptionsNotificationBadge);
}