4
This commit is contained in:
@@ -38,7 +38,13 @@
|
||||
BOOL outgoing = message.outgoing;
|
||||
BOOL audioMessage = (!outgoing && message.audioFilePath.length > 0);
|
||||
UIColor *bubbleColor = outgoing ? [UIColor colorWithHex:0x02BEAC] : [UIColor colorWithWhite:1 alpha:0.95];
|
||||
UIColor *textColor = outgoing ? [UIColor whiteColor] : [UIColor colorWithHex:0x1B1F1A];
|
||||
UIColor *incomingTextColor =
|
||||
[UIColor kb_dynamicColorWithLightColor:[UIColor colorWithHex:0x1B1F1A]
|
||||
darkColor:[UIColor whiteColor]];
|
||||
UIColor *textColor = outgoing ? [UIColor whiteColor] : incomingTextColor;
|
||||
UIColor *nameColor =
|
||||
[UIColor kb_dynamicColorWithLightColor:[UIColor colorWithHex:0x6B6F7A]
|
||||
darkColor:[UIColor colorWithHex:0xC7CBD4]];
|
||||
|
||||
self.bubbleView.backgroundColor = bubbleColor;
|
||||
self.messageLabel.textColor = textColor;
|
||||
@@ -59,6 +65,7 @@
|
||||
self.avatarView.backgroundColor =
|
||||
avatarImage ? [UIColor clearColor] : [UIColor colorWithWhite:0.9 alpha:1.0];
|
||||
self.nameLabel.hidden = outgoing;
|
||||
self.nameLabel.textColor = nameColor;
|
||||
self.nameLabel.text =
|
||||
(message.displayName.length > 0) ? message.displayName : KBLocalized(@"AI助手");
|
||||
|
||||
@@ -129,7 +136,9 @@
|
||||
_avatarView.layer.cornerRadius = 14;
|
||||
_avatarView.layer.masksToBounds = YES;
|
||||
_avatarView.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0];
|
||||
_avatarView.tintColor = [UIColor colorWithHex:0xB9BDC8];
|
||||
_avatarView.tintColor =
|
||||
[UIColor kb_dynamicColorWithLightColor:[UIColor colorWithHex:0xB9BDC8]
|
||||
darkColor:[UIColor colorWithHex:0x6B6F7A]];
|
||||
}
|
||||
return _avatarView;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user