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
@@ -74,11 +74,7 @@ pfUI:RegisterModule("thirdparty", function()
-- show/hide right chatframe
if pfUI.chat and C.chat.right.enable == "1" then
-- make sure the panel header stays hidden
if self.state then
pfUI.chat.right.panelTop:Show()
else
pfUI.chat.right.panelTop:Hide()
end
pfUI.chat.right.panelTop:SetShown(self.state)
-- set chat visibility
pfUI.chat.right:SetAlpha(self.state and 1 or 0)