From e8343efe907245a84d1fe93385fe2d20e84c6782 Mon Sep 17 00:00:00 2001 From: arichorn <78001398+arichorn@users.noreply.github.com> Date: Thu, 27 Jul 2023 21:36:44 -0500 Subject: [PATCH] Update Themes.xm --- Source/Themes.xm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Themes.xm b/Source/Themes.xm index 2a4e1bd..4e5c8fe 100644 --- a/Source/Themes.xm +++ b/Source/Themes.xm @@ -394,7 +394,7 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha: %end %hook _ASDisplayView - (void)layoutSubviews { - %orig(); + %orig(); UIResponder *responder = [self nextResponder]; while (responder != nil) { if ([responder isKindOfClass:NSClassFromString(@"YTActionSheetDialogViewController")]) { @@ -411,6 +411,7 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha: } responder = [responder nextResponder]; } +} - (void)didMoveToWindow { %orig; if (isDarkMode()) { @@ -424,7 +425,7 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha: if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = customColor; } if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = customColor; } if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = customColor; } - if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; } + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; } } } %end @@ -832,6 +833,7 @@ UIColor* raisedColor = [UIColor blackColor]; } responder = [responder nextResponder]; } +} - (void)didMoveToWindow { %orig; if (isDarkMode()) { @@ -845,7 +847,7 @@ UIColor* raisedColor = [UIColor blackColor]; if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = customColor; } if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = customColor; } if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = customColor; } - if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; } + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; } } } %end