From a505c2a89e6089f7686914f69634760e6c663ec6 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 11 Jul 2018 17:19:55 -0400 Subject: [PATCH] Tweak unread indicator + date. --- .../ConversationView/Cells/OWSMessageHeaderView.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageHeaderView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageHeaderView.m index dae87095a..cd1ab807d 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageHeaderView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageHeaderView.m @@ -78,6 +78,7 @@ const CGFloat OWSMessageHeaderViewDateHeaderVMargin = 23; { OWSAssert(viewItem); OWSAssert(conversationStyle); + OWSAssert(viewItem.unreadIndicator || viewItem.shouldShowDate); [self configureLabelsWithViewItem:viewItem]; @@ -130,9 +131,12 @@ const CGFloat OWSMessageHeaderViewDateHeaderVMargin = 23; if (viewItem.unreadIndicator) { self.titleLabel.font = UIFont.ows_dynamicTypeCaption1Font.ows_mediumWeight; - NSString *unreadTitle = NSLocalizedString( + NSString *title = NSLocalizedString( @"MESSAGES_VIEW_UNREAD_INDICATOR", @"Indicator that separates read from unread messages."); - self.titleLabel.text = [[dateString rtlSafeAppend:@" • "] rtlSafeAppend:unreadTitle].localizedUppercaseString; + if (viewItem.shouldShowDate) { + title = [[dateString rtlSafeAppend:@" • "] rtlSafeAppend:title]; + } + self.titleLabel.text = title.localizedUppercaseString; if (!viewItem.unreadIndicator.hasMoreUnseenMessages) { self.subtitleLabel.text = nil; @@ -157,6 +161,7 @@ const CGFloat OWSMessageHeaderViewDateHeaderVMargin = 23; { OWSAssert(viewItem); OWSAssert(conversationStyle); + OWSAssert(viewItem.unreadIndicator || viewItem.shouldShowDate); [self configureLabelsWithViewItem:viewItem];