Merge branch 'charlesmchen/tweakSendFailed'

pull/1/head
Matthew Chen 7 years ago
commit 79f4a984ee

@ -2,17 +2,17 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "message_send_failure@1x.png", "filename" : "error-20@1x.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "message_send_failure@2x.png", "filename" : "error-20@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "message_send_failure@3x.png", "filename" : "error-20@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

@ -273,7 +273,7 @@ class ContactViewController: OWSViewController, ContactShareViewHelperDelegate {
stackView.axis = .horizontal stackView.axis = .horizontal
stackView.distribution = .fillEqually stackView.distribution = .fillEqually
stackView.addArrangedSubview(createCircleActionButton(text: NSLocalizedString("ACTION_SEND_MESSAGE", stackView.addArrangedSubview(createCircleActionButton(text: NSLocalizedString("ACTION_SEND_MESSAGE",
comment: "Label for 'sent message' button in contact view."), comment: "Label for 'send message' button in contact view."),
imageName: "contact_view_message", imageName: "contact_view_message",
actionBlock: { [weak self] in actionBlock: { [weak self] in
guard let strongSelf = self else { return } guard let strongSelf = self else { return }
@ -539,7 +539,7 @@ class ContactViewController: OWSViewController, ContactShareViewHelperDelegate {
if let e164 = phoneNumber.tryToConvertToE164() { if let e164 = phoneNumber.tryToConvertToE164() {
if contactShare.systemContactsWithSignalAccountPhoneNumbers(contactsManager).contains(e164) { if contactShare.systemContactsWithSignalAccountPhoneNumbers(contactsManager).contains(e164) {
actionSheet.addAction(UIAlertAction(title: NSLocalizedString("ACTION_SEND_MESSAGE", actionSheet.addAction(UIAlertAction(title: NSLocalizedString("ACTION_SEND_MESSAGE",
comment: "Label for 'sent message' button in contact view."), comment: "Label for 'send message' button in contact view."),
style: .default) { _ in style: .default) { _ in
SignalApp.shared().presentConversation(forRecipientId: e164, action: .compose) SignalApp.shared().presentConversation(forRecipientId: e164, action: .compose)
}) })

@ -20,12 +20,15 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic) UIView *dateStrokeView; @property (nonatomic) UIView *dateStrokeView;
@property (nonatomic) UILabel *dateHeaderLabel; @property (nonatomic) UILabel *dateHeaderLabel;
@property (nonatomic) AvatarImageView *avatarView; @property (nonatomic) AvatarImageView *avatarView;
@property (nonatomic, nullable) UIImageView *sendFailureBadgeView;
@property (nonatomic, nullable) NSMutableArray<NSLayoutConstraint *> *viewConstraints; @property (nonatomic, nullable) NSMutableArray<NSLayoutConstraint *> *viewConstraints;
@property (nonatomic) BOOL isPresentingMenuController; @property (nonatomic) BOOL isPresentingMenuController;
@end @end
#pragma mark -
@implementation OWSMessageCell @implementation OWSMessageCell
// `[UIView init]` invokes `[self initWithFrame:...]`. // `[UIView init]` invokes `[self initWithFrame:...]`.
@ -131,6 +134,15 @@ NS_ASSUME_NONNULL_BEGIN
return self.viewItem.interaction.interactionType == OWSInteractionType_OutgoingMessage; return self.viewItem.interaction.interactionType == OWSInteractionType_OutgoingMessage;
} }
- (BOOL)shouldHaveSendFailureBadge
{
if (![self.viewItem.interaction isKindOfClass:[TSOutgoingMessage class]]) {
return NO;
}
TSOutgoingMessage *outgoingMessage = (TSOutgoingMessage *)self.viewItem.interaction;
return outgoingMessage.messageState == TSOutgoingMessageStateFailed;
}
#pragma mark - Load #pragma mark - Load
- (void)loadForDisplayWithTransaction:(YapDatabaseReadTransaction *)transaction - (void)loadForDisplayWithTransaction:(YapDatabaseReadTransaction *)transaction
@ -158,13 +170,42 @@ NS_ASSUME_NONNULL_BEGIN
relation:NSLayoutRelationGreaterThanOrEqual], relation:NSLayoutRelationGreaterThanOrEqual],
]]; ]];
} else { } else {
[self.viewConstraints addObjectsFromArray:@[ if (self.shouldHaveSendFailureBadge) {
[self.messageBubbleView autoPinEdgeToSuperviewEdge:ALEdgeLeading self.sendFailureBadgeView = [UIImageView new];
withInset:self.conversationStyle.gutterLeading self.sendFailureBadgeView.image =
relation:NSLayoutRelationGreaterThanOrEqual], [self.sendFailureBadge imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
[self.messageBubbleView autoPinEdgeToSuperviewEdge:ALEdgeTrailing self.sendFailureBadgeView.tintColor = [UIColor ows_destructiveRedColor];
withInset:self.conversationStyle.gutterTrailing], [self.contentView addSubview:self.sendFailureBadgeView];
]];
CGFloat sendFailureBadgeBottomMargin
= round(self.conversationStyle.lastTextLineAxis - self.sendFailureBadgeSize * 0.5f);
[self.viewConstraints addObjectsFromArray:@[
[self.messageBubbleView autoPinEdgeToSuperviewEdge:ALEdgeLeading
withInset:self.conversationStyle.gutterLeading
relation:NSLayoutRelationGreaterThanOrEqual],
[self.sendFailureBadgeView autoPinLeadingToTrailingEdgeOfView:self.messageBubbleView
offset:self.sendFailureBadgeSpacing],
// V-align the "send failure" badge with the
// last line of the text (if any, or where it
// would be).
[self.messageBubbleView autoPinEdge:ALEdgeBottom
toEdge:ALEdgeBottom
ofView:self.sendFailureBadgeView
withOffset:sendFailureBadgeBottomMargin],
[self.sendFailureBadgeView autoPinEdgeToSuperviewEdge:ALEdgeTrailing
withInset:self.conversationStyle.errorGutterTrailing],
[self.sendFailureBadgeView autoSetDimension:ALDimensionWidth toSize:self.sendFailureBadgeSize],
[self.sendFailureBadgeView autoSetDimension:ALDimensionHeight toSize:self.sendFailureBadgeSize],
]];
} else {
[self.viewConstraints addObjectsFromArray:@[
[self.messageBubbleView autoPinEdgeToSuperviewEdge:ALEdgeLeading
withInset:self.conversationStyle.gutterLeading
relation:NSLayoutRelationGreaterThanOrEqual],
[self.messageBubbleView autoPinEdgeToSuperviewEdge:ALEdgeTrailing
withInset:self.conversationStyle.gutterTrailing],
]];
}
} }
[self updateDateHeader]; [self updateDateHeader];
@ -184,6 +225,24 @@ NS_ASSUME_NONNULL_BEGIN
} }
} }
- (UIImage *)sendFailureBadge
{
UIImage *image = [UIImage imageNamed:@"message_send_failed"];
OWSAssert(image);
OWSAssert(image.size.width == self.sendFailureBadgeSize && image.size.height == self.sendFailureBadgeSize);
return image;
}
- (CGFloat)sendFailureBadgeSize
{
return 20.f;
}
- (CGFloat)sendFailureBadgeSpacing
{
return 8.f;
}
// * If cell is visible, lazy-load (expensive) view contents. // * If cell is visible, lazy-load (expensive) view contents.
// * If cell is not visible, eagerly unload view contents. // * If cell is not visible, eagerly unload view contents.
- (void)ensureMediaLoadState - (void)ensureMediaLoadState
@ -362,6 +421,10 @@ NS_ASSUME_NONNULL_BEGIN
cellSize.height += self.dateHeaderHeight; cellSize.height += self.dateHeaderHeight;
if (self.shouldHaveSendFailureBadge) {
cellSize.width += self.sendFailureBadgeSize + self.sendFailureBadgeSpacing;
}
cellSize = CGSizeCeil(cellSize); cellSize = CGSizeCeil(cellSize);
return cellSize; return cellSize;
@ -404,6 +467,9 @@ NS_ASSUME_NONNULL_BEGIN
self.avatarView.image = nil; self.avatarView.image = nil;
[self.avatarView removeFromSuperview]; [self.avatarView removeFromSuperview];
[self.sendFailureBadgeView removeFromSuperview];
self.sendFailureBadgeView = nil;
[self hideMenuControllerIfNecessary]; [self hideMenuControllerIfNecessary];
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];

@ -107,21 +107,24 @@ NS_ASSUME_NONNULL_BEGIN
statusIndicatorImage = [UIImage imageNamed:@"message_status_delivered"]; statusIndicatorImage = [UIImage imageNamed:@"message_status_delivered"];
break; break;
case MessageReceiptStatusFailed: case MessageReceiptStatusFailed:
// TODO: // No status indicator icon.
statusIndicatorImage = [UIImage imageNamed:@"message_status_sending"];
break; break;
} }
OWSAssert(statusIndicatorImage); if (statusIndicatorImage) {
OWSAssert(statusIndicatorImage.size.width <= self.maxImageWidth); OWSAssert(statusIndicatorImage.size.width <= self.maxImageWidth);
self.statusIndicatorImageView.image = self.statusIndicatorImageView.image =
[statusIndicatorImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; [statusIndicatorImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
if (messageStatus == MessageReceiptStatusRead) { if (messageStatus == MessageReceiptStatusRead) {
self.statusIndicatorImageView.tintColor = [UIColor ows_signalBlueColor]; self.statusIndicatorImageView.tintColor = [UIColor ows_signalBlueColor];
} else {
self.statusIndicatorImageView.tintColor = textColor;
}
self.statusIndicatorImageView.hidden = NO;
} else { } else {
self.statusIndicatorImageView.tintColor = textColor; self.statusIndicatorImageView.image = nil;
self.statusIndicatorImageView.hidden = YES;
} }
self.statusIndicatorImageView.hidden = NO;
} else { } else {
self.statusIndicatorImageView.image = nil; self.statusIndicatorImageView.image = nil;
self.statusIndicatorImageView.hidden = YES; self.statusIndicatorImageView.hidden = YES;
@ -141,13 +144,32 @@ NS_ASSUME_NONNULL_BEGIN
[self.statusIndicatorImageView.layer addAnimation:animation forKey:@"animation"]; [self.statusIndicatorImageView.layer addAnimation:animation forKey:@"animation"];
} }
- (BOOL)isFailedOutgoingMessage:(ConversationViewItem *)viewItem
{
OWSAssert(viewItem);
if (viewItem.interaction.interactionType != OWSInteractionType_OutgoingMessage) {
return NO;
}
TSOutgoingMessage *outgoingMessage = (TSOutgoingMessage *)viewItem.interaction;
MessageReceiptStatus messageStatus =
[MessageRecipientStatusUtils recipientStatusWithOutgoingMessage:outgoingMessage];
return messageStatus == MessageReceiptStatusFailed;
}
- (void)configureLabelsWithConversationViewItem:(ConversationViewItem *)viewItem - (void)configureLabelsWithConversationViewItem:(ConversationViewItem *)viewItem
{ {
OWSAssert(viewItem); OWSAssert(viewItem);
[self configureFonts]; [self configureFonts];
self.timestampLabel.text = [DateUtil formatTimestampAsTimeShort:viewItem.interaction.timestamp]; if ([self isFailedOutgoingMessage:viewItem]) {
self.timestampLabel.text
= NSLocalizedString(@"MESSAGE_STATUS_SEND_FAILED", @"Label indicating that a message failed to send.");
} else {
self.timestampLabel.text = [DateUtil formatTimestampAsTimeShort:viewItem.interaction.timestamp];
}
} }
- (CGSize)measureWithConversationViewItem:(ConversationViewItem *)viewItem - (CGSize)measureWithConversationViewItem:(ConversationViewItem *)viewItem
@ -158,10 +180,11 @@ NS_ASSUME_NONNULL_BEGIN
CGSize result = CGSizeZero; CGSize result = CGSizeZero;
result.height = MAX(self.timestampLabel.font.lineHeight, self.imageHeight); result.height = MAX(self.timestampLabel.font.lineHeight, self.imageHeight);
result.width = [self.timestampLabel sizeThatFits:CGSizeZero].width;
if (viewItem.interaction.interactionType == OWSInteractionType_OutgoingMessage) { if (viewItem.interaction.interactionType == OWSInteractionType_OutgoingMessage) {
result.width = ([self.timestampLabel sizeThatFits:CGSizeZero].width + self.maxImageWidth + self.hSpacing); if (![self isFailedOutgoingMessage:viewItem]) {
} else { result.width += (self.maxImageWidth + self.hSpacing);
result.width = [self.timestampLabel sizeThatFits:CGSizeZero].width; }
} }
return CGSizeCeil(result); return CGSizeCeil(result);
} }

@ -58,14 +58,14 @@ public class MessageRecipientStatusUtils: NSObject {
switch recipientState.state { switch recipientState.state {
case .failed: case .failed:
let shortStatusMessage = NSLocalizedString("MESSAGE_STATUS_FAILED_SHORT", comment: "status message for failed messages") let shortStatusMessage = NSLocalizedString("MESSAGE_STATUS_FAILED_SHORT", comment: "status message for failed messages")
let longStatusMessage = NSLocalizedString("MESSAGE_STATUS_FAILED", comment: "message footer for failed messages") let longStatusMessage = NSLocalizedString("MESSAGE_STATUS_FAILED", comment: "status message for failed messages")
return (status:.failed, shortStatusMessage:shortStatusMessage, longStatusMessage:longStatusMessage) return (status:.failed, shortStatusMessage:shortStatusMessage, longStatusMessage:longStatusMessage)
case .sending: case .sending:
if outgoingMessage.hasAttachments() { if outgoingMessage.hasAttachments() {
assert(outgoingMessage.messageState == .sending) assert(outgoingMessage.messageState == .sending)
let statusMessage = NSLocalizedString("MESSAGE_STATUS_UPLOADING", let statusMessage = NSLocalizedString("MESSAGE_STATUS_UPLOADING",
comment: "message footer while attachment is uploading") comment: "status message while attachment is uploading")
return (status:.uploading, shortStatusMessage:statusMessage, longStatusMessage:statusMessage) return (status:.uploading, shortStatusMessage:statusMessage, longStatusMessage:statusMessage)
} else { } else {
assert(outgoingMessage.messageState == .sending) assert(outgoingMessage.messageState == .sending)
@ -78,7 +78,7 @@ public class MessageRecipientStatusUtils: NSObject {
if let readTimestamp = recipientState.readTimestamp { if let readTimestamp = recipientState.readTimestamp {
let timestampString = DateUtil.formatPastTimestampRelativeToNow(readTimestamp.uint64Value) let timestampString = DateUtil.formatPastTimestampRelativeToNow(readTimestamp.uint64Value)
let shortStatusMessage = timestampString let shortStatusMessage = timestampString
let longStatusMessage = NSLocalizedString("MESSAGE_STATUS_READ", comment: "message footer for read messages").rtlSafeAppend(" ") let longStatusMessage = NSLocalizedString("MESSAGE_STATUS_READ", comment: "status message for read messages").rtlSafeAppend(" ")
.rtlSafeAppend(timestampString) .rtlSafeAppend(timestampString)
return (status:.read, shortStatusMessage:shortStatusMessage, longStatusMessage:longStatusMessage) return (status:.read, shortStatusMessage:shortStatusMessage, longStatusMessage:longStatusMessage)
} }
@ -92,7 +92,7 @@ public class MessageRecipientStatusUtils: NSObject {
} }
let statusMessage = let statusMessage =
NSLocalizedString("MESSAGE_STATUS_SENT", NSLocalizedString("MESSAGE_STATUS_SENT",
comment: "message footer for sent messages") comment: "status message for sent messages")
return (status:.sent, shortStatusMessage:statusMessage, longStatusMessage:statusMessage) return (status:.sent, shortStatusMessage:statusMessage, longStatusMessage:statusMessage)
case .skipped: case .skipped:
let statusMessage = NSLocalizedString("MESSAGE_STATUS_RECIPIENT_SKIPPED", let statusMessage = NSLocalizedString("MESSAGE_STATUS_RECIPIENT_SKIPPED",
@ -107,29 +107,29 @@ public class MessageRecipientStatusUtils: NSObject {
switch outgoingMessage.messageState { switch outgoingMessage.messageState {
case .failed: case .failed:
// Use the "long" version of this message here. // Use the "long" version of this message here.
return (.failed, NSLocalizedString("MESSAGE_STATUS_FAILED", comment: "message footer for failed messages")) return (.failed, NSLocalizedString("MESSAGE_STATUS_FAILED", comment: "status message for failed messages"))
case .sending: case .sending:
if outgoingMessage.hasAttachments() { if outgoingMessage.hasAttachments() {
return (.uploading, NSLocalizedString("MESSAGE_STATUS_UPLOADING", return (.uploading, NSLocalizedString("MESSAGE_STATUS_UPLOADING",
comment: "message footer while attachment is uploading")) comment: "status message while attachment is uploading"))
} else { } else {
return (.sending, NSLocalizedString("MESSAGE_STATUS_SENDING", return (.sending, NSLocalizedString("MESSAGE_STATUS_SENDING",
comment: "message status while message is sending.")) comment: "message status while message is sending."))
} }
case .sent: case .sent:
if outgoingMessage.readRecipientIds().count > 0 { if outgoingMessage.readRecipientIds().count > 0 {
return (.read, NSLocalizedString("MESSAGE_STATUS_READ", comment: "message footer for read messages")) return (.read, NSLocalizedString("MESSAGE_STATUS_READ", comment: "status message for read messages"))
} }
if outgoingMessage.wasDeliveredToAnyRecipient { if outgoingMessage.wasDeliveredToAnyRecipient {
return (.delivered, NSLocalizedString("MESSAGE_STATUS_DELIVERED", return (.delivered, NSLocalizedString("MESSAGE_STATUS_DELIVERED",
comment: "message status for message delivered to their recipient.")) comment: "message status for message delivered to their recipient."))
} }
return (.sent, NSLocalizedString("MESSAGE_STATUS_SENT", return (.sent, NSLocalizedString("MESSAGE_STATUS_SENT",
comment: "message footer for sent messages")) comment: "status message for sent messages"))
default: default:
owsFail("\(self.logTag) Message has unexpected status: \(outgoingMessage.messageState).") owsFail("\(self.logTag) Message has unexpected status: \(outgoingMessage.messageState).")
return (.sent, NSLocalizedString("MESSAGE_STATUS_SENT", return (.sent, NSLocalizedString("MESSAGE_STATUS_SENT",
comment: "message footer for sent messages")) comment: "status message for sent messages"))
} }
} }

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "ارسال دعوة"; "ACTION_INVITE" = "ارسال دعوة";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "إرسال رسالة"; "ACTION_SEND_MESSAGE" = "إرسال رسالة";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Покани във Signal"; "ACTION_INVITE" = "Покани във Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Изпрати Съобщение"; "ACTION_SEND_MESSAGE" = "Изпрати Съобщение";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invitér til Signal"; "ACTION_INVITE" = "Invitér til Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Besked"; "ACTION_SEND_MESSAGE" = "Send Besked";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Zu Signal einladen"; "ACTION_INVITE" = "Zu Signal einladen";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Nachricht senden"; "ACTION_SEND_MESSAGE" = "Nachricht senden";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,8 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view.
Label for button that lets you send a message to a contact. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */
@ -511,7 +512,7 @@
/* Navbar title when viewing settings for a 1-on-1 thread */ /* Navbar title when viewing settings for a 1-on-1 thread */
"CONVERSATION_SETTINGS_CONTACT_INFO_TITLE" = "Contact Info"; "CONVERSATION_SETTINGS_CONTACT_INFO_TITLE" = "Contact Info";
/* Indicates that user's profile has been shared with a group. */ /* Label for table cell which leads to picking a new conversation color */
"CONVERSATION_SETTINGS_CONVERSATION_COLOR" = "Color"; "CONVERSATION_SETTINGS_CONVERSATION_COLOR" = "Color";
/* Navbar title when viewing settings for a group thread */ /* Navbar title when viewing settings for a group thread */
@ -1205,25 +1206,28 @@
/* message status for message delivered to their recipient. */ /* message status for message delivered to their recipient. */
"MESSAGE_STATUS_DELIVERED" = "Delivered"; "MESSAGE_STATUS_DELIVERED" = "Delivered";
/* message footer for failed messages */ /* status message for failed messages */
"MESSAGE_STATUS_FAILED" = "Sending failed. Tap for info."; "MESSAGE_STATUS_FAILED" = "Sending failed.";
/* status message for failed messages */ /* status message for failed messages */
"MESSAGE_STATUS_FAILED_SHORT" = "Failed"; "MESSAGE_STATUS_FAILED_SHORT" = "Failed";
/* message footer for read messages */ /* status message for read messages */
"MESSAGE_STATUS_READ" = "Read"; "MESSAGE_STATUS_READ" = "Read";
/* message status if message delivery to a recipient is skipped. We skip delivering group messages to users who have left the group or unregistered their Signal account. */ /* message status if message delivery to a recipient is skipped. We skip delivering group messages to users who have left the group or unregistered their Signal account. */
"MESSAGE_STATUS_RECIPIENT_SKIPPED" = "Skipped"; "MESSAGE_STATUS_RECIPIENT_SKIPPED" = "Skipped";
/* Label indicating that a message failed to send. */
"MESSAGE_STATUS_SEND_FAILED" = "Send Failed";
/* message status while message is sending. */ /* message status while message is sending. */
"MESSAGE_STATUS_SENDING" = "Sending..."; "MESSAGE_STATUS_SENDING" = "Sending...";
/* message footer for sent messages */ /* status message for sent messages */
"MESSAGE_STATUS_SENT" = "Sent"; "MESSAGE_STATUS_SENT" = "Sent";
/* message footer while attachment is uploading */ /* status message while attachment is uploading */
"MESSAGE_STATUS_UPLOADING" = "Uploading…"; "MESSAGE_STATUS_UPLOADING" = "Uploading…";
/* Indicates that one member of this group conversation is no longer verified. Embeds {{user's name or phone number}}. */ /* Indicates that one member of this group conversation is no longer verified. Embeds {{user's name or phone number}}. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invitar a Signal"; "ACTION_INVITE" = "Invitar a Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Enviar mensaje"; "ACTION_SEND_MESSAGE" = "Enviar mensaje";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Kutsu Signalisse"; "ACTION_INVITE" = "Kutsu Signalisse";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Saada sõnum"; "ACTION_SEND_MESSAGE" = "Saada sõnum";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "دعوت به سیگنال"; "ACTION_INVITE" = "دعوت به سیگنال";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "ارسال پیام"; "ACTION_SEND_MESSAGE" = "ارسال پیام";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Kutsu Signaliin"; "ACTION_INVITE" = "Kutsu Signaliin";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Lähetä viesti"; "ACTION_SEND_MESSAGE" = "Lähetä viesti";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Inviter à Signal"; "ACTION_INVITE" = "Inviter à Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Envoyer un message"; "ACTION_SEND_MESSAGE" = "Envoyer un message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "הזמן אל Signal"; "ACTION_INVITE" = "הזמן אל Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "שלח הודעה"; "ACTION_SEND_MESSAGE" = "שלח הודעה";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Undang gabung ke Signal"; "ACTION_INVITE" = "Undang gabung ke Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Kirim Pesan"; "ACTION_SEND_MESSAGE" = "Kirim Pesan";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invita a Signal"; "ACTION_INVITE" = "Invita a Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Manda messaggio"; "ACTION_SEND_MESSAGE" = "Manda messaggio";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "招待する"; "ACTION_INVITE" = "招待する";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "メッセージ送信"; "ACTION_SEND_MESSAGE" = "メッセージ送信";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "អញ្ជើញចូលប្រើស៊ីហ្គណល"; "ACTION_INVITE" = "អញ្ជើញចូលប្រើស៊ីហ្គណល";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "ផ្ញើសារ"; "ACTION_SEND_MESSAGE" = "ផ្ញើសារ";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Pakviesti į Signal"; "ACTION_INVITE" = "Pakviesti į Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Siųsti žinutę"; "ACTION_SEND_MESSAGE" = "Siųsti žinutę";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Inviter til Signal"; "ACTION_INVITE" = "Inviter til Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send melding"; "ACTION_SEND_MESSAGE" = "Send melding";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Nodig uit voor Signal"; "ACTION_INVITE" = "Nodig uit voor Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Stuur bericht"; "ACTION_SEND_MESSAGE" = "Stuur bericht";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Zaproś do Signala"; "ACTION_INVITE" = "Zaproś do Signala";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Wyślij wiadomość"; "ACTION_SEND_MESSAGE" = "Wyślij wiadomość";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Convidar para o Signal"; "ACTION_INVITE" = "Convidar para o Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Enviar mensagem"; "ACTION_SEND_MESSAGE" = "Enviar mensagem";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Convidar para o Signal"; "ACTION_INVITE" = "Convidar para o Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Enviar Mensagem"; "ACTION_SEND_MESSAGE" = "Enviar Mensagem";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invită pe Signal"; "ACTION_INVITE" = "Invită pe Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Trimite mesaj"; "ACTION_SEND_MESSAGE" = "Trimite mesaj";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Пригласить в Signal"; "ACTION_INVITE" = "Пригласить в Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Отправить сообщение"; "ACTION_SEND_MESSAGE" = "Отправить сообщение";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Povabi k uporabi"; "ACTION_INVITE" = "Povabi k uporabi";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Pošlji sporočilo"; "ACTION_SEND_MESSAGE" = "Pošlji sporočilo";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Bjud in till Signal"; "ACTION_INVITE" = "Bjud in till Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Skicka meddelande"; "ACTION_SEND_MESSAGE" = "Skicka meddelande";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Invite to Signal"; "ACTION_INVITE" = "Invite to Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Send Message"; "ACTION_SEND_MESSAGE" = "Send Message";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "Signal'e davet et"; "ACTION_INVITE" = "Signal'e davet et";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "Mesaj Gönder"; "ACTION_SEND_MESSAGE" = "Mesaj Gönder";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "邀请其使用 Signal"; "ACTION_INVITE" = "邀请其使用 Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "发送消息"; "ACTION_SEND_MESSAGE" = "发送消息";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -10,7 +10,7 @@
/* Label for 'invite' button in contact view. */ /* Label for 'invite' button in contact view. */
"ACTION_INVITE" = "邀請來使用 Signal"; "ACTION_INVITE" = "邀請來使用 Signal";
/* Label for 'sent message' button in contact view. */ /* Label for 'send message' button in contact view. */
"ACTION_SEND_MESSAGE" = "傳送訊息"; "ACTION_SEND_MESSAGE" = "傳送訊息";
/* Label for 'share contact' button. */ /* Label for 'share contact' button. */

@ -79,7 +79,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (UIColor *)ows_destructiveRedColor + (UIColor *)ows_destructiveRedColor
{ {
return [UIColor colorWithRed:0.98639106750488281 green:0.10408364236354828 blue:0.33135244250297546 alpha:1.f]; return [UIColor colorWithRGBHex:0xF44336];
} }
+ (UIColor *)ows_errorMessageBorderColor + (UIColor *)ows_errorMessageBorderColor

@ -27,6 +27,7 @@ public class ConversationStyle: NSObject {
// like "date headers" and "unread indicator". // like "date headers" and "unread indicator".
@objc public var fullWidthGutterLeading: CGFloat = 0 @objc public var fullWidthGutterLeading: CGFloat = 0
@objc public var fullWidthGutterTrailing: CGFloat = 0 @objc public var fullWidthGutterTrailing: CGFloat = 0
@objc public var errorGutterTrailing: CGFloat = 0
// viewWidth - (gutterLeading + gutterTrailing) // viewWidth - (gutterLeading + gutterTrailing)
@objc public var contentWidth: CGFloat = 0 @objc public var contentWidth: CGFloat = 0
@ -87,6 +88,7 @@ public class ConversationStyle: NSObject {
} }
fullWidthGutterLeading = gutterLeading fullWidthGutterLeading = gutterLeading
fullWidthGutterTrailing = gutterTrailing fullWidthGutterTrailing = gutterTrailing
errorGutterTrailing = 16
contentWidth = viewWidth - (gutterLeading + gutterTrailing) contentWidth = viewWidth - (gutterLeading + gutterTrailing)

Loading…
Cancel
Save