mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-01 03:19:59 +00:00
replace poll-until-cancel OnUpdate frames with C_Timer / RunNextFrame
Seven ad-hoc OnUpdate handlers were only spinning long enough to reach a known deadline or a next-frame defer, then unhooking themselves. Convert them to their proper primitives: - autovendor: 0.3s wait after junk sell → C_Timer.After(0.3, ...) - innervatecall: cooldown-expiry ready ping → C_Timer.After(cd, ...) - focus: re-arm UI_ERROR_MESSAGE next tick → RunNextFrame - macrotweak: conflict scan after addons load → RunNextFrame - ui-widgets (CreateQuestionDialog): font-measure resize → RunNextFrame - libdebuff: post-PEW Nampower init → RunNextFrame - bubbles: WorldFrame scan after chat event → RunNextFrame Net -18 lines and no more throwaway frames sitting on the OnUpdate list.
This commit is contained in:
+3
-3
@@ -12,7 +12,9 @@ pfUI:RegisterModule("bubbles", function ()
|
||||
pfUI.bubbles:RegisterEvent("CHAT_MSG_MONSTER_PARTY")
|
||||
|
||||
pfUI.bubbles:SetScript("OnEvent", function()
|
||||
pfUI.bubbles:SetScript("OnUpdate", pfUI.bubbles.ScanBubbles)
|
||||
-- Bubble frames are attached to WorldFrame after the chat event fires,
|
||||
-- so wait one tick before scanning.
|
||||
RunNextFrame(function() pfUI.bubbles:ScanBubbles() end)
|
||||
end)
|
||||
|
||||
function pfUI.bubbles:IsBubble(f)
|
||||
@@ -66,7 +68,5 @@ pfUI:RegisterModule("bubbles", function ()
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
pfUI.bubbles:SetScript("OnUpdate", nil)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user