some refactorings

This commit is contained in:
Manuel Simon Hirsig
2015-10-10 13:13:47 +02:00
parent ce72819497
commit 55c53c6f93
6 changed files with 99 additions and 96 deletions
+10 -10
View File
@@ -84,12 +84,22 @@ function Aux.buy.SearchButton_onclick()
end,
on_complete = function()
entries = entries or {}
if getn(entries) == 0 then
set_message("No auctions were found")
else
AuxBuyMessage:Hide()
end
AuxBuyStopButton:Hide()
AuxBuySearchButton:Show()
refresh = true
end,
on_abort = function()
entries = entries or {}
if getn(entries) == 0 then
set_message("No auctions were found")
else
AuxBuyMessage:Hide()
end
AuxBuyStopButton:Hide()
AuxBuySearchButton:Show()
refresh = true
@@ -303,16 +313,6 @@ end
function Aux_Buy_ScrollbarUpdate()
Aux.list.populate(AuxBuyList, entries or {})
-- if entries then
-- table.sort(entries, function(a,b) return a.buyout_price_per_unit < b.buyout_price_per_unit end)
-- end
if entries and getn(entries) == 0 then
set_message("No auctions were found")
else
AuxBuyMessage:Hide()
end
end
-----------------------------------------