聊天头像

This commit is contained in:
fatiao 2026-01-26 19:55:04 +08:00
parent baa441aa22
commit 065efca003
2 changed files with 6 additions and 3 deletions

View File

@ -188,7 +188,7 @@ function ChatContentItemCtr:SetData(wnd, itemLua, itemData, enterType, onClickOw
contentNodes["L"..itemData.message.subType]:SetActive(true)
contentNodes["R"..itemData.message.subType]:SetActive(true)
local headIconPath = itemData.fromData.imgId
local headIconPath = "PlayerHeads/player_head_"..itemData.fromData.imgId
local currHeadImage
if isLeft then
currHeadImage = itemLua.leftNode.headIconNode.headIcon.image

View File

@ -790,7 +790,8 @@ function UIChatView:RefreshMessageTab()
local worldHeadIcons = {}
for k, v in pairs(worldChats) do
if v.type == Enum.ChatSystemType.Hero then
table.insert(worldHeadIcons, v.fromData.imgId)
local headIconPath = "PlayerHeads/player_head_"..v.fromData.imgId
table.insert(worldHeadIcons, headIconPath)
end
if #worldHeadIcons >= 9 then break end
end
@ -870,11 +871,12 @@ function UIChatView:RefreshMessageTab()
local privateChat = v
local newestIdx = #privateChat.chats
if newestIdx > 0 then
local headIconPath = privateChat.fromData.imgId
local chatTabData = {
chatType = ChatType.Private,
channelId = privateChat.fromData.uid,
title = privateChat.fromData.nickname,
headIcons = { privateChat.fromData.imgId },
headIcons = { headIconPath },
subTitle = privateChat.chats[newestIdx].message.message,
}
table.insert(chatTabDataList, chatTabData)
@ -1261,6 +1263,7 @@ function UIChatView:RefreshChatLayer2(channelId, storyData)
if self.currChatData.fromData then
self.chatLayer2.titleBarText.text.text = self.currChatData.fromData.nickname
end
PrintJson("TAG-World", self.currChatData.chats)
-- guild chat
elseif channelId == CONST_CHANNEL_GUILD then