From ba13d1b987938bd47faecbc0c185a121958bcdc1 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri, 9 Aug 2024 22:44:51 -0700 Subject: [PATCH] Live Chat OLED dark mode --- YTLitePlus.h | 8 ++++++++ YTLitePlus.xm | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/YTLitePlus.h b/YTLitePlus.h index f2de2c4..90611be 100644 --- a/YTLitePlus.h +++ b/YTLitePlus.h @@ -96,6 +96,14 @@ @property (nonatomic, assign, readwrite) BOOL enableSnapToChapter; @end +// Hide Autoplay Mini Preview - @bhackel +@interface YTAutonavPreviewView : UIView +@end + +// OLED Live Chat - @bhackel +@interface YTLUserDefaults : NSUserDefaults +@end + // Hide Home Tab - @bhackel @interface YTPivotBarViewController : UIViewController @property NSString *selectedPivotIdentifier; diff --git a/YTLitePlus.xm b/YTLitePlus.xm index 0798571..74c36b3 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -542,11 +542,10 @@ BOOL isTabSelected = NO; } %end - -// Hide the Comment Section Previews under the Video Player - @arichornlover %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; self.opaque = YES; @@ -558,6 +557,12 @@ BOOL isTabSelected = NO; [self setNeedsLayout]; [self removeFromSuperview]; } + // Live chat OLED dark mode - @bhackel + if (([[YTLUserDefaults standardUserDefaults] boolForKey:@"oledTheme"] // YTLite OLED Theme + || [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 1 // YTLitePlus OLED Theme + ) && [self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) { + self.backgroundColor = [UIColor blackColor]; + } } %end