Skip to content

Commit

Permalink
Only disable addons in the set listing if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Nov 27, 2024
1 parent e6d75ab commit 1b6a179
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion BetterAddonList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ do
view:CreateTitle(L["Addon List"])
sort(sets[currentSet], icmp)
for _, addonName in ipairs(sets[currentSet]) do
view:CreateButton(addonName):SetEnabled(false)
local _, _, _, loadable, reason = C_AddOns.GetAddOnInfo(addonName)
view:CreateButton(addonName):SetEnabled(loadable or reason ~= "MISSING")
end
end

Expand Down
3 changes: 2 additions & 1 deletion BetterAddonList_Classic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ do
view:CreateTitle(L["Addon List"])
sort(sets[currentSet], icmp)
for _, addonName in ipairs(sets[currentSet]) do
view:CreateButton(addonName):SetEnabled(false)
local _, _, _, loadable, reason = C_AddOns.GetAddOnInfo(addonName)
view:CreateButton(addonName):SetEnabled(loadable or reason ~= "MISSING")
end
end

Expand Down

0 comments on commit 1b6a179

Please sign in to comment.