|
@@ -481,7 +481,7 @@ extension ChatViewController: MessagesDataSource {
|
|
func avatar(for message: MessageType, at indexPath: IndexPath, in _: MessagesCollectionView) -> Avatar {
|
|
func avatar(for message: MessageType, at indexPath: IndexPath, in _: MessagesCollectionView) -> Avatar {
|
|
let message = messageList[indexPath.section]
|
|
let message = messageList[indexPath.section]
|
|
let contact = message.fromContact
|
|
let contact = message.fromContact
|
|
- return Avatar(image: contact.profileImage, initials: Utils.getInitials(inputName: contact.name))
|
|
|
|
|
|
+ return Avatar(image: contact.profileImage, initials: Utils.getInitials(inputName: contact.displayName))
|
|
}
|
|
}
|
|
|
|
|
|
func cellTopLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString? {
|
|
func cellTopLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString? {
|
|
@@ -706,7 +706,7 @@ extension ChatViewController: MessagesDisplayDelegate {
|
|
func configureAvatarView(_ avatarView: AvatarView, for message: MessageType, at indexPath: IndexPath, in _: MessagesCollectionView) {
|
|
func configureAvatarView(_ avatarView: AvatarView, for message: MessageType, at indexPath: IndexPath, in _: MessagesCollectionView) {
|
|
let message = messageList[indexPath.section]
|
|
let message = messageList[indexPath.section]
|
|
let contact = message.fromContact
|
|
let contact = message.fromContact
|
|
- let avatar = Avatar(image: contact.profileImage, initials: Utils.getInitials(inputName: contact.name))
|
|
|
|
|
|
+ let avatar = Avatar(image: contact.profileImage, initials: Utils.getInitials(inputName: contact.displayName))
|
|
avatarView.set(avatar: avatar)
|
|
avatarView.set(avatar: avatar)
|
|
avatarView.isHidden = isNextMessageSameSender(at: indexPath) || message.isInfo
|
|
avatarView.isHidden = isNextMessageSameSender(at: indexPath) || message.isInfo
|
|
avatarView.backgroundColor = contact.color
|
|
avatarView.backgroundColor = contact.color
|