From e067e8dec5ba012cb9422b1730c6ffb51a659f37 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:50:33 -0700 Subject: [PATCH] Fix OLED live chat --- YTLitePlus.xm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/YTLitePlus.xm b/YTLitePlus.xm index c4248cb..a9da363 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -545,6 +545,7 @@ BOOL isTabSelected = NO; %hook _ASDisplayView - (void)didMoveToWindow { %orig; + // Hide the Comment Section Previews under the Video Player - @arichornlover if ((IsEnabled(@"hidePreviewCommentSection_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"])) { self.hidden = YES; @@ -557,10 +558,14 @@ BOOL isTabSelected = NO; [self setNeedsLayout]; [self removeFromSuperview]; } + // Live chat OLED dark mode - @bhackel - if (([[%c(YTLUserDefaults) standardUserDefaults] boolForKey:@"oledTheme"] // YTLite OLED Theme - || [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 1 // YTLitePlus OLED Theme - ) && [self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) { + CGFloat alpha; + if ([[%c(YTLUserDefaults) standardUserDefaults] boolForKey:@"oledTheme"] // YTLite OLED Theme + && [self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"] // Live chat text message + && [self.backgroundColor getWhite:nil alpha:&alpha] // Check if color is grayscale and get alpha + && alpha != 0.0) // Ignore shorts live chat + { self.backgroundColor = [UIColor blackColor]; } }