Update Themes.xm

This commit is contained in:
arichorn 2023-07-27 21:36:44 -05:00 committed by GitHub
parent ecde382a4f
commit e8343efe90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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