Fix bug with tab creation

This commit is contained in:
2024-12-08 01:30:17 +01:00
parent 9ce495ec1a
commit ee032e1909

View File

@@ -1,6 +1,7 @@
---@class Channel ---@class Channel
---@field name string ---@field name string
---@field password string|nil ---@field password string|nil
local debug = false local debug = false
---@type Channel[] ---@type Channel[]
@@ -73,7 +74,7 @@ local function FindOrCreateChatFrame(chatFrameName, groups, channels)
local frame = _G["ChatFrame" .. i] local frame = _G["ChatFrame" .. i]
if FCF_IsValidChatFrame(frame) then if FCF_IsValidChatFrame(frame) then
if debug then print(string.format("Frame %s is valid", chatFrameName)) end if debug then print(string.format("Frame %s is valid", chatFrameName)) end
return frame chatFrame = frame
else else
if debug then print(string.format("Frame %s is invalid", chatFrameName)) end if debug then print(string.format("Frame %s is invalid", chatFrameName)) end
end end
@@ -109,7 +110,7 @@ local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:SetScript("OnEvent", function(self, event, ...) frame:SetScript("OnEvent", function(self, event, ...)
JoinChannels() JoinChannels()
--FindOrCreateChatFrame("Auto", subscribedMessageGroups, subscribedChannels) FindOrCreateChatFrame("Auto", subscribedMessageGroups, subscribedChannels)
FindOrCreateChatFrame("Agent", {}, { "Agent" }) -- FindOrCreateChatFrame("Agent", {}, { "Agent" })
FindOrCreateChatFrame("Horde", {}, { "Horde" }) -- FindOrCreateChatFrame("Horde", {}, { "Horde" })
end) end)