Update LowContrastMode (1)

If y’all are wondering. This is old code, I’m adding. Not sure if it will work here but hope it helps!
This commit is contained in:
arichornlover 2023-12-13 02:34:21 -06:00 committed by GitHub
parent 3e7c7970b0
commit e1d4228ae0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,6 +171,16 @@ UIColor *lcmHexColor;
return [UIColor whiteColor];
}
%end
%hook ELMTextNode
- (void)updateAttributedText {
%orig;
NSMutableDictionary *attributes = [[self.attributedText attributesAtIndex:0 effectiveRange:NULL] mutableCopy];
attributes[NSForegroundColorAttributeName] = [UIColor whiteColor];
NSMutableAttributedString *modifiedText = [[NSMutableAttributedString alloc] initWithAttributedString:self.attributedText];
[modifiedText setAttributes:attributes range:NSMakeRange(0, modifiedText.length)];
self.attributedText = modifiedText;
}
%end
%hook YCHLiveChatLabel
- (NSAttributedString *)attributedText {
NSAttributedString *originalAttributedString = %orig;