Respond to CR.

pull/1/head
Matthew Chen 6 years ago
parent cf8d5868e7
commit a28a5251f6

@ -119,7 +119,6 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert(statusIndicatorImage.size.width <= self.maxImageWidth);
self.statusIndicatorImageView.image =
[statusIndicatorImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
// TODO: How to indicate read status for transitional colors?
self.statusIndicatorImageView.tintColor = textColor;
self.statusIndicatorImageView.hidden = NO;
} else {

@ -75,6 +75,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (class, readonly, nonatomic) UIColor *ows_green800Color;
@property (class, readonly, nonatomic) UIColor *ows_deepOrange900Color;
@property (class, readonly, nonatomic) UIColor *ows_grey600Color;
@property (class, readonly, nonatomic) UIColor *ows_darkSkyBlueColor;
@end

@ -289,6 +289,11 @@ NS_ASSUME_NONNULL_BEGIN
return [UIColor colorWithRGBHex:0x757575];
}
+ (UIColor *)ows_darkSkyBlueColor
{
return [UIColor colorWithRed:32.f / 255.f green:144.f / 255.f blue:234.f / 255.f alpha:1.f];
}
+ (NSDictionary<NSString *, UIColor *> *)ows_conversationColorMap
{
static NSDictionary<NSString *, UIColor *> *colorMap;

@ -137,13 +137,13 @@ public class ConversationStyle: NSObject {
private static let defaultBubbleColorIncoming = UIColor.ows_messageBubbleLightGray
@objc
public let bubbleColorOutgoingUnsent = UIColor.gray
public let bubbleColorOutgoingUnsent = UIColor.ows_light10
@objc
public let bubbleColorOutgoingSending = UIColor.ows_fadedBlue
@objc
public let bubbleColorOutgoingSent = UIColor.ows_materialBlue
public let bubbleColorOutgoingSent = UIColor.ows_darkSkyBlue
@objc
public var primaryColor: UIColor
@ -182,14 +182,14 @@ public class ConversationStyle: NSObject {
}
@objc
public static var bubbleTextColorIncoming = UIColor.ows_black
public static var bubbleTextColorIncoming = UIColor.ows_light90
public static var bubbleTextColorOutgoing = UIColor.ows_white
@objc
public func bubbleTextColor(message: TSMessage) -> UIColor {
if message is TSIncomingMessage {
return ConversationStyle.bubbleTextColorIncoming
} else if let _ = message as? TSOutgoingMessage {
} else if message is TSOutgoingMessage {
return ConversationStyle.bubbleTextColorOutgoing
} else {
owsFail("Unexpected message type: \(message)")
@ -218,25 +218,19 @@ public class ConversationStyle: NSObject {
@objc
public func quotedReplyBubbleColor(isIncoming: Bool) -> UIColor {
// TODO: Values
// TODO: Should this reflect "quoting self" v. "quoting other"?
if isIncoming {
return bubbleColorOutgoingSent.withAlphaComponent(0.7)
return bubbleColorOutgoingSent.withAlphaComponent(0.25)
} else {
return ConversationStyle.defaultBubbleColorIncoming.withAlphaComponent(0.7)
return ConversationStyle.defaultBubbleColorIncoming.withAlphaComponent(0.75)
}
}
@objc
public func quotedReplyStripeColor(isIncoming: Bool) -> UIColor {
// TODO: Values
// TODO: Should this reflect "quoting self" v. "quoting other"?
if isIncoming {
return bubbleColorOutgoingSent
} else {
return ConversationStyle.defaultBubbleColorIncoming
return UIColor.white
}
}
@ -248,13 +242,11 @@ public class ConversationStyle: NSObject {
@objc
public func quotedReplyAuthorColor() -> UIColor {
// TODO:
return UIColor.ows_light90
}
@objc
public func quotedReplyTextColor() -> UIColor {
// TODO:
return UIColor.ows_light90
}

Loading…
Cancel
Save