Merge pull request #530 from bhackel/fix/fullscreen-actions
Fix hide fullscreen actions
This commit is contained in:
commit
d95ea2246b
1 changed files with 8 additions and 8 deletions
|
|
@ -554,21 +554,21 @@ BOOL isAd(YTIElementRenderer *self) {
|
||||||
%group hideFullscreenActions
|
%group hideFullscreenActions
|
||||||
%hook YTMainAppVideoPlayerOverlayViewController
|
%hook YTMainAppVideoPlayerOverlayViewController
|
||||||
- (BOOL)isFullscreenActionsEnabled {
|
- (BOOL)isFullscreenActionsEnabled {
|
||||||
// This didn't work on its own - weird
|
return NO;
|
||||||
return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig;
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTFullscreenActionsView
|
%hook YTFullscreenActionsView
|
||||||
- (BOOL)enabled {
|
- (BOOL)enabled {
|
||||||
// Attempt 2
|
return NO;
|
||||||
return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig;
|
|
||||||
}
|
}
|
||||||
- (void)removeFromSuperview {
|
- (void)layoutSubviews {
|
||||||
// Attempt 3
|
// Check if already removed from superview
|
||||||
if (IS_ENABLED(@"hideFullscreenActions_enabled")) {
|
if (self.superview) {
|
||||||
[self removeFromSuperview];
|
[self removeFromSuperview];
|
||||||
}
|
}
|
||||||
%orig;
|
self.hidden = YES;
|
||||||
|
self.frame = CGRectZero;
|
||||||
|
%orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%end
|
%end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue