From 5ea3dc91c3619e7525da770eb2d124bb3b5f9875 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 2 Oct 2019 23:28:08 +0300 Subject: Fix Dark Mode --- Juick/Views/MessageCell.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Juick/Views/MessageCell.m') diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m index 90d4ae2..c3a8afd 100644 --- a/Juick/Views/MessageCell.m +++ b/Juick/Views/MessageCell.m @@ -22,7 +22,6 @@ const NSString *unreadMarker = @"●"; - (void)awakeFromNib { [super awakeFromNib]; - self.text.textColor = [UIColor colorNamed:@"Text"]; self.text.dataDetectorTypes = UIDataDetectorTypeAll; self.text.tintColor = [UIColor colorNamed:@"Title"]; self.title.textColor = [UIColor colorNamed:@"Title"]; @@ -103,7 +102,9 @@ const NSString *unreadMarker = @"●"; [self.text setHidden:NO]; NSMutableAttributedString *txt = [[NSMutableAttributedString alloc] initWithString:msg.text - attributes:@{NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleBody]}]; + attributes:@{NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleBody], + NSForegroundColorAttributeName:[UIColor colorNamed:@"Text"] + }]; [txt beginEditing]; for (Entity *entity in msg.entities) { NSUInteger start = entity.start ? [entity.start unsignedIntegerValue] : 0; @@ -115,7 +116,7 @@ const NSString *unreadMarker = @"●"; [txt addAttribute:NSLinkAttributeName value:entity.link range:currentRange]; } if ([entity.type isEqualToString:@"q"]) { - [txt addAttribute:NSForegroundColorAttributeName value:[UIColor darkGrayColor] range:currentRange]; + [txt addAttribute:NSForegroundColorAttributeName value:[UIColor colorNamed:@"Muted"] range:currentRange]; [txt addAttribute:NSParagraphStyleAttributeName value:_quoteStyle range:currentRange]; } if ([entity.type isEqualToString:@"u"]) { @@ -140,7 +141,7 @@ const NSString *unreadMarker = @"●"; initWithString:tagsList attributes:@{ NSFontAttributeName:_italicFont, - NSForegroundColorAttributeName:[UIColor darkGrayColor] + NSForegroundColorAttributeName:[UIColor colorNamed:@"Muted"] }] atIndex:0]; } [txt endEditing]; -- cgit v1.2.3