Major refactor: split codebase into multiple files

Now for the fun part: will this compile?
This commit is contained in:
Foxster
2023-12-25 00:27:46 -08:00
parent 0a4bfd8abc
commit d24b4392b0
17 changed files with 856 additions and 879 deletions
+31
View File
@@ -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);
}
}