Просмотр исходного кода

feat: 房间公屏和动态评论增加 腾讯emoji 显示支持(目前仅 android 可发,iOS 仅展示)

陈文艺 18 часов назад
Родитель
Сommit
ff6e502773

+ 1 - 1
Lanu/Views/Profile/Feed/LNFeedCommentCell.swift

@@ -26,7 +26,7 @@ class LNFeedCommentCell: UITableViewCell {
         avatar.sd_setImage(with: URL(string: comment.avatar))
         nameLabel.text = comment.nickname
         timeLabel.text = TimeInterval(comment.createdAt / 1_000).tencentIMTimeDesc
-        contentLabel.text = comment.textContent
+        contentLabel.attributedText = comment.textContent.getEmojiString(with: .body_m)
     }
     
     required init?(coder: NSCoder) {

+ 1 - 1
Lanu/Views/Profile/Feed/LNProfileFeedItemCell.swift

@@ -47,7 +47,7 @@ class LNProfileFeedItemCell: UITableViewCell {
         avatar.sd_setImage(with: URL(string: item.avatar))
         nameLabel.text = item.nickname
         timeLabel.text = TimeInterval(item.createdAt / 1_000).tencentIMTimeDesc
-        contentLabel.text = item.textContent
+        contentLabel.attributedText = item.textContent.getEmojiString(with: .body_m)
         likeView.update(id: item.id, liked: item.liked, count: item.likeCount)
         commentView.update(id: item.id, count: item.commentCount)
         videoView.stop()

+ 1 - 1
Lanu/Views/Room/Message/Cells/LNRoomChatMessageCell.swift

@@ -24,7 +24,7 @@ class LNRoomChatMessageCell: UITableViewCell {
     }
     
     func update(_ message: LNRoomChatMessageItem) {
-        contentLabel.text = message.content
+        contentLabel.attributedText = message.content.getEmojiString(with: .heading_h5)
         avatarView.sd_setImage(with: URL(string: message.avatar))
         nameLabel.text = message.nickname