UIChatView:读取聊天记录的无限循环Bug
This commit is contained in:
parent
691fdd1f5d
commit
942a523b90
@ -253,6 +253,7 @@ function UIChatCtr:GetStoryChatDatas(storyId, currStoryPerformCfgId)
|
||||
local tmpStoryId = storyId
|
||||
local allStoryList = {}
|
||||
while storyRecordDatas[tmpStoryId] ~= nil do
|
||||
local hasNextStory = false
|
||||
table.insert(allStoryList, tmpStoryId)
|
||||
local storyCfg = ManagerContainer.CfgMgr:GetStoryDataById(tmpStoryId)
|
||||
if storyCfg.SelectionNext and #storyCfg.SelectionNext > 0 then
|
||||
@ -260,9 +261,11 @@ function UIChatCtr:GetStoryChatDatas(storyId, currStoryPerformCfgId)
|
||||
local id = storyCfg.SelectionNext[i]
|
||||
if storyRecordDatas[id] then
|
||||
tmpStoryId = id
|
||||
hasNextStory = true
|
||||
end
|
||||
end
|
||||
else
|
||||
end
|
||||
if hasNextStory == false then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
@ -140,7 +140,7 @@ function UIChatView:OnChatLayer2BtnSend()
|
||||
self.sendPerformStoryCfgId = 0
|
||||
else
|
||||
local chatDataType = Enum.ChatDataType.Private
|
||||
if self.currChatChannelId = CONST_CHANNEL_WORLD then
|
||||
if self.currChatChannelId == CONST_CHANNEL_WORLD then
|
||||
chatDataType = Enum.ChatDataType.World
|
||||
elseif self.currChatChannelId == CONST_CHANNEL_GUILD then
|
||||
chatDataType = Enum.ChatDataType.Guild
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user