fix: cache form signature only after bar refresh actually runs
UPDATE_SHAPESHIFT_FORMS firing before the ActionBars module exists cached the signature without refreshing, causing the identical later event to be skipped.
This commit is contained in:
parent
6c0c1f0624
commit
aadeb06793
1 changed files with 3 additions and 1 deletions
|
|
@ -129,11 +129,13 @@ refresh:SetScript("OnEvent", function(self, event)
|
|||
-- UPDATE_SHAPESHIFT_FORMS spam.
|
||||
local sig = currentFormSignature()
|
||||
if sig == lastFormSignature then return end
|
||||
lastFormSignature = sig
|
||||
|
||||
local mod = Bartender4 and Bartender4.GetModule and Bartender4:GetModule("ActionBars", true)
|
||||
if not mod or not mod.actionbars then return end
|
||||
for _, bar in pairs(mod.actionbars) do
|
||||
if bar and bar.UpdateStates then bar:UpdateStates() end
|
||||
end
|
||||
-- Only cache the signature once a refresh actually ran, so an event
|
||||
-- arriving before module init doesn't swallow the next identical one.
|
||||
lastFormSignature = sig
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue