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