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:
Florian Andrew George Berthold 2026-06-10 02:14:21 +02:00
parent 6c0c1f0624
commit aadeb06793

View file

@ -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)