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
@@ -86,11 +86,7 @@ pfUI:RegisterModule("autovendor", function ()
if not pfMerchantFrame_Update then
local pfMerchantFrame_Update = MerchantFrame_Update
function _G.MerchantFrame_Update()
if MerchantFrame.selectedTab == 1 and C["global"]["autosell"] ~= "1" then
autovendor.button:Show()
else
autovendor.button:Hide()
end
autovendor.button:SetShown(MerchantFrame.selectedTab == 1 and C["global"]["autosell"] ~= "1")
pfMerchantFrame_Update()
end
end