Major refactor: split codebase into multiple files
Now for the fun part: will this compile?
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user