Respond to CR.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-03-15 11:39:47 -03:00
parent 9ae047a1da
commit f0e7e635f2
2 changed files with 22 additions and 21 deletions

View file

@ -1273,22 +1273,17 @@ typedef enum : NSUInteger {
if (message.messageType == TSOutgoingMessageAdapter) {
TSOutgoingMessage *outgoingMessage = (TSOutgoingMessage *)message.interaction;
if (outgoingMessage.messageState == TSOutgoingMessageStateUnsent) {
return [[NSAttributedString alloc] initWithString:NSLocalizedString(@"FAILED_SENDING_TEXT", nil)];
return [[NSAttributedString alloc] initWithString:NSLocalizedString(@"MESSAGE_STATUS_FAILED",
@"message footer for failed messages")];
} else if (outgoingMessage.messageState == TSOutgoingMessageStateSent ||
outgoingMessage.messageState == TSOutgoingMessageStateDelivered) {
// Show a checkmark icon.
//
// TODO: It'd be nice to distinguish the "sent" and "delivered" states,
// but JSQMessageViewController doesn't give us a great way to do so.
// We don't have a great icon for the "delivered" state,
// we can't kern checkmarks together in a JSQMessageViewController
// "cell bottom label", etc.
NSAttributedString *result =
[[NSAttributedString alloc] initWithString:@"N"
attributes:@{
NSFontAttributeName: [UIFont ows_elegantIconsFont:10.f],
}];
NSString *text = (outgoingMessage.messageState == TSOutgoingMessageStateSent
? NSLocalizedString(@"MESSAGE_STATUS_SENT",
@"message footer for sent messages")
: NSLocalizedString(@"MESSAGE_STATUS_DELIVERED",
@"message footer for delivered messages"));
NSAttributedString *result = [[NSAttributedString alloc] initWithString:text];
// Show when it's the last message in the thread
if (indexPath.item == [self.collectionView numberOfItemsInSection:indexPath.section] - 1) {
[self updateLastDeliveredMessage:message];
@ -1304,7 +1299,7 @@ typedef enum : NSUInteger {
return result;
}
} else if (message.isMediaBeingSent) {
return [[NSAttributedString alloc] initWithString:NSLocalizedString(@"UPLOADING_MESSAGE_TEXT",
return [[NSAttributedString alloc] initWithString:NSLocalizedString(@"MESSAGE_STATUS_UPLOADING",
@"message footer while attachment is uploading")];
} else {
OWSAssert(outgoingMessage.messageState == TSOutgoingMessageStateAttemptingOut);

View file

@ -337,9 +337,6 @@
/* action sheet header when re-sending message which failed because of untrusted identity keys */
"FAILED_SENDING_BECAUSE_UNTRUSTED_IDENTITY_KEY" = "You must accept the new safety number before you will be able to send.";
/* No comment provided by engineer. */
"FAILED_SENDING_TEXT" = "Sending failed. Tap to retry.";
/* alert title */
"FAILED_VERIFICATION_TITLE" = "Failed to Verify Safety Number!";
@ -493,6 +490,18 @@
/* No comment provided by engineer. */
"MESSAGE_COMPOSEVIEW_TITLE" = "New Message";
/* message footer for delivered messages */
"MESSAGE_STATUS_DELIVERED" = "Delivered";
/* message footer for failed messages */
"MESSAGE_STATUS_FAILED" = "Sending failed. Tap to retry.";
/* message footer for sent messages */
"MESSAGE_STATUS_SENT" = "Sent";
/* message footer while attachment is uploading */
"MESSAGE_STATUS_UPLOADING" = "Uploading...";
/* The subtitle for the messages view title indicates that the title can be tapped to access settings for this conversation. */
"MESSAGES_VIEW_TITLE_SUBTITLE" = "Tap here for settings";
@ -979,9 +988,6 @@
/* No comment provided by engineer. */
"Upgrading Signal ..." = "Upgrading Signal ...";
/* message footer while attachment is uploading */
"UPLOADING_MESSAGE_TEXT" = "Uploading...";
/* button text for back button on verification view */
"VERIFICATION_BACK_BUTTON" = "Back";