uYouEnhanced/Sources/BigYTMiniPlayer.xm
Foxster d24b4392b0 Major refactor: split codebase into multiple files
Now for the fun part: will this compile?
2023-12-25 00:27:46 -08:00

31 lines
No EOL
879 B
Text

#import "BigYTMiniPlayer.h"
%group BigYTMiniPlayer // https://github.com/Galactic-Dev/BigYTMiniPlayer
%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
%ctor {
if (IS_ENABLED(@"bigYTMiniPlayer_enabled") && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
%init(BigYTMiniPlayer);
}
}