[聊天]========报错修改提交

dev_chengFeng
wangzhenxing 2022-05-30 14:59:16 +08:00
parent 19203e65aa
commit b1bf334a58
1 changed files with 9 additions and 3 deletions

View File

@ -436,12 +436,18 @@ end
-- 聊天节点数据匹配
function this.ChatItemAdapter(node, data, isShowTime)
local right = Util.GetGameObject(node, "rightchat")
if not right then
return
end
local left = Util.GetGameObject(node, "leftchat")
local isMyChat = data.senderId == PlayerManager.uid
right:SetActive(isMyChat)
left:SetActive(not isMyChat)
if right then
right:SetActive(isMyChat)
end
if left then
left:SetActive(not isMyChat)
end
node = isMyChat and right or left
local time = Util.GetGameObject(node, "time")
local timeLab = Util.GetGameObject(node, "time/Text"):GetComponent("Text")
local content = Util.GetGameObject(node, "contentroot/bg/content"):GetComponent("Text")