Commit b9556fc3 authored by Simpy's avatar Simpy 🐹
Browse files

still hide the holders for databar when the bar isn't shown

parent d72e0065
......@@ -29,8 +29,10 @@ function DB:AzeriteBar_Update(event, unit)
if not azeriteItemLocation or (DB.db.azerite.hideAtMaxLevel and C_AzeriteItem_IsAzeriteItemAtMaxLevel()) or E.mylevel > 50 then
bar:Hide()
bar.holder:Hide()
else
bar:Show()
bar.holder:Show()
local cur, max = C_AzeriteItem_GetAzeriteItemXPInfo(azeriteItemLocation)
local currentLevel = C_AzeriteItem_GetPowerLevel(azeriteItemLocation)
......
......@@ -43,9 +43,11 @@ function DB:ExperienceBar_Update()
local bar = DB.StatusBars.Experience
if not DB.db.experience.enable or (bar.db.hideAtMaxLevel and not DB:ExperienceBar_ShouldBeVisible()) then
bar:Hide()
bar.holder:Hide()
return
else
bar:Show()
bar.holder:Show()
end
CurrentXP, XPToLevel, RestedXP = UnitXP('player'), UnitXPMax('player'), GetXPExhaustion()
......
......@@ -15,9 +15,11 @@ function DB:HonorBar_Update(event, unit)
local bar = DB.StatusBars.Honor
if not DB.db.honor.enable or (event == 'PLAYER_FLAGS_CHANGED' and unit ~= 'player') then
bar:Hide()
bar.holder:Hide()
return
else
bar:Show()
bar.holder:Show()
end
CurrentHonor, MaxHonor, CurrentLevel = UnitHonor('player'), UnitHonorMax('player'), UnitHonorLevel('player')
......
......@@ -18,9 +18,11 @@ function DB:ReputationBar_Update()
if not name or (DB.db.reputation.hideBelowMaxLevel and not IsPlayerAtEffectiveMaxLevel()) then
bar:Hide()
bar.holder:Hide()
return
else
bar:Show()
bar.holder:Show()
end
local displayString, textFormat = '', DB.db.reputation.textFormat
......
......@@ -49,6 +49,7 @@ function DB:ThreatBar_Update()
if percent and percent > 0 and (isInGroup or petExists) then
local name = UnitName('target')
bar:Show()
bar.holder:Show()
if percent == 100 then
--Build threat list
......@@ -94,6 +95,7 @@ function DB:ThreatBar_Update()
end
else
bar:Hide()
bar.holder:Hide()
end
wipe(bar.list)
......
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