Commit e709e27b authored by Merathilis's avatar Merathilis

Update again MicroBar visibility.

parent 75b89c04
......@@ -49,6 +49,7 @@ local GetNumSavedWorldBosses = GetNumSavedWorldBosses
local GetSavedWorldBossInfo = GetSavedWorldBossInfo
local RequestRaidInfo = RequestRaidInfo
local RegisterStateDriver = RegisterStateDriver
local UnregisterStateDriver = UnregisterStateDriver
local SecondsToTime = SecondsToTime
local GameTooltip = GameTooltip
local UnitLevel = UnitLevel
......@@ -928,9 +929,14 @@ function module:Toggle()
if module.db.enable then
microBar:Show()
E:EnableMover(microBar.mover:GetName())
if module.db.hideInCombat then
RegisterStateDriver(microBar, 'visibility', '[combat] hide;show')
end
else
microBar:Hide()
E:DisableMover(microBar.mover:GetName())
UnregisterStateDriver(microBar, 'visibility')
end
module:UNIT_AURA(nil, "player")
end
......@@ -968,10 +974,6 @@ function module:Initialize()
self:ForUpdateAll()
if module.db.hideInCombat then
RegisterStateDriver(microBar, 'visibility', '[combat] hide;show')
end
self:RegisterEvent("UNIT_AURA")
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment