Improved “Hide Fullscreen Button” Option

This has been updated to not use layoutSubviews.
This commit is contained in:
arichornlover 2024-03-09 00:49:09 -06:00 committed by GitHub
parent 32e29710e6
commit b315050d80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -629,17 +629,17 @@ static NSString *accessGroupID() {
// Hide Fullscreen Button - @arichornlover
%hook YTInlinePlayerBarContainerView
- (void)layoutSubviews {
%orig;
- (void)setFullscreenButtonDisabled:(BOOL)fullscreenButtonDisabled {
%orig;
if (IS_ENABLED(@"disableFullscreenButton_enabled")) {
if (self.exitFullscreenButton) {
if (self.exitFullscreenButton && self.enterFullscreenButton) {
[self.exitFullscreenButton removeFromSuperview];
}
if (self.enterFullscreenButton) {
[self.enterFullscreenButton removeFromSuperview];
self.exitFullscreenButton.frame = CGRectZero;
self.enterFullscreenButton.frame = CGRectZero;
}
self.fullscreenButtonDisabled = YES;
}
self.fullscreenButtonDisabled = YES;
}
%end