From 73276177f3c74e547d70fbb4321609a97eeb8514 Mon Sep 17 00:00:00 2001 From: Balackburn <93828569+Balackburn@users.noreply.github.com> Date: Thu, 6 Jul 2023 19:11:06 +0200 Subject: [PATCH] fix issue #3 --- YTLitePlus.xm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/YTLitePlus.xm b/YTLitePlus.xm index 1ee0b20..1b23604 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -71,6 +71,23 @@ static BOOL IsEnabled(NSString *key) { } %end +# pragma mark - Hide Notification Button +%hook YTRightNavigationButtons +- (void)didMoveToWindow { + %orig; +} + +- (void)layoutSubviews { + %orig; + if (IsEnabled(@"hideNotificationButton_enabled")) { + self.notificationButton.hidden = YES; + } + if (IsEnabled(@"hideSponsorBlockButton_enabled")) { + self.sponsorBlockButton.hidden = YES; + } +} +%end + // Hide Cast Button since Cercube's option is not working %group gHideCastButton %hook MDXPlaybackRouteButtonController