From d5e15b2a0d0de6750f10f9ee6d0eeeeb7317255b Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 9 Jul 2018 17:00:49 -0600 Subject: [PATCH] FAILED label capitalized to spec --- .../ConversationView/Cells/OWSMessageFooterView.m | 7 +++++-- Signal/src/util/DateUtil.m | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m index a125c4dc0..5d491663c 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m @@ -164,12 +164,15 @@ NS_ASSUME_NONNULL_BEGIN [self configureFonts]; + NSString *timestampLabelText; if ([self isFailedOutgoingMessage:viewItem]) { - self.timestampLabel.text + timestampLabelText = NSLocalizedString(@"MESSAGE_STATUS_SEND_FAILED", @"Label indicating that a message failed to send."); } else { - self.timestampLabel.text = [DateUtil formatMessageTimestamp:viewItem.interaction.timestamp]; + timestampLabelText = [DateUtil formatMessageTimestamp:viewItem.interaction.timestamp]; } + + self.timestampLabel.text = timestampLabelText.localizedUppercaseString; } - (CGSize)measureWithConversationViewItem:(ConversationViewItem *)viewItem diff --git a/Signal/src/util/DateUtil.m b/Signal/src/util/DateUtil.m index bda7dcaec..38e1bb47e 100644 --- a/Signal/src/util/DateUtil.m +++ b/Signal/src/util/DateUtil.m @@ -302,7 +302,7 @@ static NSString *const DATE_FORMAT_WEEKDAY = @"EEEE"; @"hours in the past. Embeds {{The number of hours}}."), hoursString]; } - return result.uppercaseString; + return result; } + (BOOL)isTimestampFromLastHour:(uint64_t)timestamp