mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 16:02:00 +00:00
Merge pull request #138 from PoomSmart/format-cleanup
Code formatting cleanup
This commit is contained in:
commit
4502236d64
3 changed files with 262 additions and 265 deletions
13
uYouPlus.xm
13
uYouPlus.xm
|
|
@ -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 {
|
||||
|
|
@ -121,7 +117,8 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||
rootViewController = [rootViewController presentedViewController];
|
||||
}
|
||||
[rootViewController presentViewController:alertController animated:YES completion:nil];
|
||||
} else { return %orig; }
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue