Skip to content

Commit 17251cc

Browse files
authored
Fixes #8952: Disable UI when leagues are not populated (#8984)
1 parent 287f66b commit 17251cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Classes/TradeQuery.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ Highest Weight - Displays the order retrieved from trade]]
371371
else
372372
self.tradeQueryRequests:FetchLeagues(self.pbRealm, function(leagues, errMsg)
373373
if errMsg then
374-
self:SetNotice("Error while fetching league list: "..errMsg)
374+
self:SetNotice(self.controls.pbNotice, "Error while fetching league list: "..errMsg)
375375
return
376376
end
377377
local sorted_leagues = { }
@@ -679,7 +679,7 @@ end
679679
function TradeQueryClass:SetNotice(notice_control, msg)
680680
if msg:find("No Matching Results") then
681681
msg = colorCodes.WARNING .. msg
682-
elseif msg:find("Error:") then
682+
elseif msg:find("Error") then
683683
msg = colorCodes.NEGATIVE .. msg
684684
end
685685
notice_control.label = msg
@@ -914,6 +914,7 @@ function TradeQueryClass:PriceItemRowDisplay(row_idx, top_pane_alignment_ref, ro
914914
end)
915915
end)
916916
controls["bestButton"..row_idx].shown = function() return not self.resultTbl[row_idx] end
917+
controls["bestButton"..row_idx].enabled = function() return self.pbLeague end
917918
controls["bestButton"..row_idx].tooltipText = "Creates a weighted search to find the highest Stat Value items for this slot."
918919
local pbURL
919920
controls["uri"..row_idx] = new("EditControl", { "TOPLEFT", controls["bestButton"..row_idx], "TOPRIGHT"}, {8, 0, 514, row_height}, nil, nil, "^%C\t\n", nil, function(buf)

0 commit comments

Comments
 (0)