Code formatting cleanup
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||
|
||||
@interface YTMainAppVideoPlayerOverlayView : UIView
|
||||
-(UIViewController *)_viewControllerForAncestor;
|
||||
- (UIViewController *)_viewControllerForAncestor;
|
||||
@end
|
||||
|
||||
@interface YTWatchMiniBarView : UIView
|
||||
|
||||
+7
-10
@@ -11,7 +11,6 @@
|
||||
#import "Tweaks/YouTubeHeader/YTIPivotBarSupportedRenderers.h"
|
||||
#import "Tweaks/YouTubeHeader/YTIPivotBarRenderer.h"
|
||||
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
||||
#include <RemoteLog.h>
|
||||
|
||||
BOOL hideHUD() {
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||
@@ -46,7 +45,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
// Hide CC / Autoplay switch
|
||||
%hook YTMainAppControlsOverlayView
|
||||
- (void)layoutSubviews {
|
||||
%orig();
|
||||
%orig;
|
||||
if (hideAutoplaySwitch()) {
|
||||
MSHookIvar<UIView *>(self, "_autonavSwitch").hidden = YES;
|
||||
}
|
||||
@@ -59,19 +58,16 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
// Hide HUD Messages
|
||||
%hook YTHUDMessageView
|
||||
- (id)initWithMessage:(id)arg1 dismissHandler:(id)arg2 {
|
||||
if (hideHUD()) {
|
||||
return NULL;
|
||||
} else { return %orig; }
|
||||
return hideHUD() ? nil : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// YTAutoFullScreen: https://github.com/PoomSmart/YTAutoFullScreen/
|
||||
%hook YTPlayerViewController
|
||||
- (void)loadWithPlayerTransition:(id)arg1 playbackConfig:(id)arg2 {
|
||||
if (autoFullScreen()) {
|
||||
%orig;
|
||||
if (autoFullScreen())
|
||||
[NSTimer scheduledTimerWithTimeInterval:0.75 target:self selector:@selector(autoFullscreen) userInfo:nil repeats:NO];
|
||||
} else { return %orig; }
|
||||
}
|
||||
%new
|
||||
- (void)autoFullscreen {
|
||||
@@ -111,17 +107,18 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
[alertController addAction:noButton];
|
||||
|
||||
id rootViewController = [%c(UIApplication) sharedApplication].delegate.window.rootViewController;
|
||||
if([rootViewController isKindOfClass:[%c(UINavigationController) class]]) {
|
||||
if ([rootViewController isKindOfClass:[%c(UINavigationController) class]]) {
|
||||
rootViewController = ((UINavigationController *)rootViewController).viewControllers.firstObject;
|
||||
}
|
||||
if([rootViewController isKindOfClass:[%c(UITabBarController) class]]) {
|
||||
if ([rootViewController isKindOfClass:[%c(UITabBarController) class]]) {
|
||||
rootViewController = ((UITabBarController *)rootViewController).selectedViewController;
|
||||
}
|
||||
if ([rootViewController presentedViewController] != nil) {
|
||||
rootViewController = [rootViewController presentedViewController];
|
||||
}
|
||||
[rootViewController presentViewController:alertController animated:YES completion:nil];
|
||||
} else { return %orig; }
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user