Use CHANNEL_UI_UPDATE for rejoining channels as well as initial setup.
This commit is contained in:
parent
8d437e2f06
commit
a005f12194
1 changed files with 3 additions and 2 deletions
|
@ -14,9 +14,10 @@ function core:OnEnable()
|
||||||
self:Hook('ToggleChatChannel','ToggleChatChannel',true)
|
self:Hook('ToggleChatChannel','ToggleChatChannel',true)
|
||||||
|
|
||||||
self:RegisterEvent('CHAT_MSG_CHANNEL_NOTICE','ProcessChannelChange')
|
self:RegisterEvent('CHAT_MSG_CHANNEL_NOTICE','ProcessChannelChange')
|
||||||
self:RegisterEvent('PLAYER_ALIVE','RejoinChannels')
|
|
||||||
if core.firstrun then
|
if core.firstrun then
|
||||||
self:RegisterEvent('CHANNEL_UI_UPDATE','SetupChatSaver')
|
self:RegisterEvent('CHANNEL_UI_UPDATE','SetupChatSaver')
|
||||||
|
else
|
||||||
|
self:RegisterEvent('CHANNEL_UI_UPDATE','RejoinChannels')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -78,7 +79,7 @@ function core:ProcessChannelChange(_,message,_,_,_,_,_,_,index,name)
|
||||||
ChatSaverDB[name]['frames'][DEFAULT_CHAT_FRAME:GetID()] = true
|
ChatSaverDB[name]['frames'][DEFAULT_CHAT_FRAME:GetID()] = true
|
||||||
end
|
end
|
||||||
elseif message == 'YOU_LEFT' then
|
elseif message == 'YOU_LEFT' then
|
||||||
ChatSaverDB[name] = nil
|
--ChatSaverDB[name] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue