Apply 'failed' message status icon in home view.

This commit is contained in:
Matthew Chen 2018-07-09 12:42:03 -04:00
parent a04065a52c
commit d0618e3738
10 changed files with 29 additions and 5 deletions

View file

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "error-12@1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "error-12@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "error-12@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

View file

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

View file

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 765 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -220,7 +220,7 @@ NS_ASSUME_NONNULL_BEGIN
- (UIImage *)sendFailureBadge
{
UIImage *image = [UIImage imageNamed:@"message_send_failed"];
UIImage *image = [UIImage imageNamed:@"message_status_failed_large"];
OWSAssert(image);
OWSAssert(image.size.width == self.sendFailureBadgeSize && image.size.height == self.sendFailureBadgeSize);
return image;

View file

@ -286,17 +286,18 @@ NS_ASSUME_NONNULL_BEGIN
statusIndicatorImage = [UIImage imageNamed:@"message_status_sent"];
break;
case MessageReceiptStatusDelivered:
statusIndicatorImage = [UIImage imageNamed:@"message_status_delivered"];
break;
case MessageReceiptStatusRead:
statusIndicatorImage = [UIImage imageNamed:@"message_status_delivered"];
messageStatusViewTintColor = [UIColor ows_signalBlueColor];
break;
case MessageReceiptStatusFailed:
// TODO:
statusIndicatorImage = [UIImage imageNamed:@"message_status_sending"];
statusIndicatorImage = [UIImage imageNamed:@"message_status_failed"];
messageStatusViewTintColor = [UIColor ows_destructiveRedColor];
break;
}
if (messageStatus == MessageReceiptStatusRead) {
messageStatusViewTintColor = [UIColor ows_signalBlueColor];
}
}
self.messageStatusView.image = [statusIndicatorImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
self.messageStatusView.tintColor = messageStatusViewTintColor;