mirror of
https://github.com/YTLitePlus/YTLitePlus.git
synced 2026-05-15 04:01:17 +00:00
Merge pull request #331 from bhackel/fix-oled-live-chat
Fix OLED live chat
This commit is contained in:
commit
dd88efc631
1 changed files with 8 additions and 3 deletions
|
|
@ -570,6 +570,7 @@ BOOL isTabSelected = NO;
|
||||||
%hook _ASDisplayView
|
%hook _ASDisplayView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
|
|
||||||
// Hide the Comment Section Previews under the Video Player - @arichornlover
|
// Hide the Comment Section Previews under the Video Player - @arichornlover
|
||||||
if ((IsEnabled(@"hidePreviewCommentSection_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"])) {
|
if ((IsEnabled(@"hidePreviewCommentSection_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"])) {
|
||||||
self.hidden = YES;
|
self.hidden = YES;
|
||||||
|
|
@ -582,10 +583,14 @@ BOOL isTabSelected = NO;
|
||||||
[self setNeedsLayout];
|
[self setNeedsLayout];
|
||||||
[self removeFromSuperview];
|
[self removeFromSuperview];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Live chat OLED dark mode - @bhackel
|
// Live chat OLED dark mode - @bhackel
|
||||||
if (([[%c(YTLUserDefaults) standardUserDefaults] boolForKey:@"oledTheme"] // YTLite OLED Theme
|
CGFloat alpha;
|
||||||
|| [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 1 // YTLitePlus OLED Theme
|
if ([[%c(YTLUserDefaults) standardUserDefaults] boolForKey:@"oledTheme"] // YTLite OLED Theme
|
||||||
) && [self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) {
|
&& [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];
|
self.backgroundColor = [UIColor blackColor];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue