Skip to content

Commit

Permalink
refactor: use new event callback system
Browse files Browse the repository at this point in the history
  • Loading branch information
fang2hou committed Aug 13, 2024
1 parent 0b761fb commit 6e7e1ab
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions Modules/Maps/EventTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1405,22 +1405,9 @@ function ET:Initialize()
self:RegisterEvent(event, "HandlerEvent")
end

hooksecurefunc(
_G.WorldMapFrame,
"Show",
function()
ET:UpdateTrackers()
end
)

self:RegisterEvent(
"CVAR_UPDATE",
function(_, cvar)
if cvar == "miniWorldMap" then
E:Delay(0.25, self.UpdateTrackers, self)
end
end
)
EventRegistry:RegisterCallback("WorldMapOnShow", self.UpdateTrackers, self)
EventRegistry:RegisterCallback("WorldMapMinimized", E.Delay, E, 0.1, self.UpdateTrackers, self)
EventRegistry:RegisterCallback("WorldMapMaximized", E.Delay, E, 0.1, self.UpdateTrackers, self)
end

function ET:ProfileUpdate()
Expand Down

0 comments on commit 6e7e1ab

Please sign in to comment.