diff --git a/Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift b/Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift index 54ea5a09..71b335e5 100644 --- a/Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift +++ b/Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift @@ -191,17 +191,22 @@ class ChatLeftAudioCell: ChatBaseCell { } audioContainerView.sendSubviewToBack(bubbleImageView) - configNameLabel(topOffset) + + configNameLabel() + playing = false } - func configNameLabel(topOffset: CGFloat) { - + func configNameLabel() { + if inGroup { nameLabel.text = user?.nickname - nameLabel.sizeToFit() - nameLabel.frame = CGRect(x: CGRectGetMaxX(avatarImageView.frame) + YepConfig.chatCellGapBetweenTextContentLabelAndAvatar(), y: audioContainerView.frame.origin.y - topOffset, width: nameLabel.frame.width, height: nameLabel.frame.height) -// bubbleTailImageView.hidden = true + //nameLabel.sizeToFit() + let height = YepConfig.ChatCell.nameLabelHeightForGroup + let x = CGRectGetMaxX(avatarImageView.frame) + YepConfig.chatCellGapBetweenTextContentLabelAndAvatar() + let y = audioContainerView.frame.origin.y - height + let width = contentView.bounds.width - x - 10 + nameLabel.frame = CGRect(x: x, y: y, width: width, height: height) } } }