fix: Added isUnusable detection with caching

This commit is contained in:
Salikh Gurgenidze
2026-01-24 12:36:48 +04:00
parent 06db5f15fa
commit 52af32daaa
12 changed files with 198 additions and 258 deletions
+4 -10
View File
@@ -615,16 +615,10 @@ function Tooltip:Initialize()
if event == "BAG_UPDATE" then
if cacheClearPending then return end
cacheClearPending = true
-- Debounce: batch rapid BAG_UPDATE events
local debounceFrame = CreateFrame("Frame")
debounceFrame.elapsed = 0
debounceFrame:SetScript("OnUpdate", function()
this.elapsed = this.elapsed + arg1
if this.elapsed >= 0.2 then
this:SetScript("OnUpdate", nil)
cacheClearPending = false
Tooltip:ClearCache()
end
-- Debounce: batch rapid BAG_UPDATE events (uses pooled timer)
Guda_ScheduleTimer(0.2, function()
cacheClearPending = false
Tooltip:ClearCache()
end)
end
end)