Fix crashing?

This commit is contained in:
arichornlover 2024-03-11 00:12:20 -05:00 committed by GitHub
parent 30a6fdb6fc
commit 1387109ebc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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