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