Tweak color palette.
This commit is contained in:
parent
cbc80abff1
commit
f2153f888b
@ -1180,7 +1180,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (UIColor *)bodyTextColor
|
||||
{
|
||||
return self.isIncoming ? [UIColor blackColor] : [UIColor whiteColor];
|
||||
OWSAssert([self.viewItem.interaction isKindOfClass:[TSMessage class]]);
|
||||
|
||||
TSMessage *message = (TSMessage *)self.viewItem.interaction;
|
||||
return [OWSMessagesBubbleColors bubbleTextColorWithMessage:message];
|
||||
}
|
||||
|
||||
- (BOOL)isMediaBeingSent
|
||||
|
||||
@ -34,7 +34,6 @@ public class ConversationStyle: NSObject {
|
||||
@objc public var contentWidth: CGFloat = 0
|
||||
|
||||
// viewWidth - (gutterfullWidthGutterLeadingLeading + fullWidthGutterTrailing)
|
||||
// TODO: Is this necessary?
|
||||
@objc public var fullWidthContentWidth: CGFloat = 0
|
||||
|
||||
@objc public var maxMessageWidth: CGFloat = 0
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
import Foundation
|
||||
import SignalServiceKit
|
||||
|
||||
// TODO: Possibly pull this into Conversation Style.
|
||||
@objc
|
||||
public class OWSMessagesBubbleColors: NSObject {
|
||||
|
||||
@ -15,14 +16,17 @@ public class OWSMessagesBubbleColors: NSObject {
|
||||
@objc
|
||||
public static let shared = OWSMessagesBubbleColors()
|
||||
|
||||
// TODO: Remove this! Incoming bubble colors are now dynamic.
|
||||
@objc
|
||||
public static let bubbleColorIncoming = UIColor.ows_messageBubbleLightGray
|
||||
|
||||
// TODO:
|
||||
@objc
|
||||
public static let bubbleColorOutgoingUnsent = UIColor.gray
|
||||
public static let bubbleColorOutgoingUnsent = UIColor.ows_red
|
||||
|
||||
// TODO:
|
||||
@objc
|
||||
public static let bubbleColorOutgoingSending = UIColor.ows_fadedBlue
|
||||
public static let bubbleColorOutgoingSending = UIColor.ows_light35
|
||||
|
||||
@objc
|
||||
public static let bubbleColorOutgoingSent = UIColor.ows_light10
|
||||
@ -45,4 +49,23 @@ public class OWSMessagesBubbleColors: NSObject {
|
||||
return UIColor.ows_materialBlue
|
||||
}
|
||||
}
|
||||
|
||||
@objc
|
||||
public static func bubbleTextColor(message: TSMessage) -> UIColor {
|
||||
if message is TSIncomingMessage {
|
||||
return UIColor.ows_white
|
||||
} else if let outgoingMessage = message as? TSOutgoingMessage {
|
||||
switch outgoingMessage.messageState {
|
||||
case .failed:
|
||||
return UIColor.ows_black
|
||||
case .sending:
|
||||
return UIColor.ows_black
|
||||
default:
|
||||
return UIColor.ows_black
|
||||
}
|
||||
} else {
|
||||
owsFail("Unexpected message type: \(message)")
|
||||
return UIColor.ows_materialBlue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user