From 0b2facd36988539cf5c3ac35f87e30af17f13a09 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 9 Jul 2018 12:24:18 -0600 Subject: [PATCH] Only include date in date header (no time) // FREEBIE --- .../ConversationView/Cells/OWSMessageCell.m | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m index 515a3142c..dc47b1af6 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m @@ -273,25 +273,11 @@ NS_ASSUME_NONNULL_BEGIN if (self.viewItem.shouldShowDate) { NSDate *date = self.viewItem.interaction.dateForSorting; NSString *dateString = [dateHeaderDateFormatter stringFromDate:date]; - NSString *timeString = [dateHeaderTimeFormatter stringFromDate:date]; - - NSAttributedString *attributedText = [NSAttributedString new]; - attributedText = [attributedText rtlSafeAppend:dateString.localizedUppercaseString - attributes:@{ - NSFontAttributeName : self.dateHeaderFont, - NSForegroundColorAttributeName : [UIColor lightGrayColor], - }]; - attributedText = [attributedText rtlSafeAppend:@" " - attributes:@{ - NSFontAttributeName : self.dateHeaderFont, - }]; - attributedText = [attributedText rtlSafeAppend:timeString - attributes:@{ - NSFontAttributeName : self.dateHeaderFont, - NSForegroundColorAttributeName : [UIColor lightGrayColor], - }]; - - self.dateHeaderLabel.attributedText = attributedText; + + self.dateHeaderLabel.font = self.dateHeaderFont; + self.dateHeaderLabel.textColor = UIColor.lightGrayColor; + + self.dateHeaderLabel.text = dateString; [self.contentView addSubview:self.dateHeaderView]; [self.viewConstraints addObjectsFromArray:@[