Toggle visibility with SetShown instead of Show/Hide branches

Each if/else that only showed one object in one branch and hid it in the other is now ClassicAPI's SetShown, which shows on any truthy value. 21 sites across 10 modules.
This commit is contained in:
Brues
2026-10-30 19:49:43 -05:00
parent f7680ded0b
commit 4616c2bc5f
10 changed files with 21 additions and 77 deletions
+1 -5
View File
@@ -402,11 +402,7 @@ pfUI:RegisterModule("addonbuttons", function ()
-- rescan before deciding whether the panel should be shown by default
pfUI.addonbuttons:ProcessButtons()
if C.abuttons.showdefault == "1" and GetNumButtons() > 0 then
pfUI.addonbuttons:Show()
else
pfUI.addonbuttons:Hide()
end
pfUI.addonbuttons:SetShown(C.abuttons.showdefault == "1" and GetNumButtons() > 0)
-- apply workarounds
for k, v in pairs(pfUI.addonbuttons.overrides) do