some refactoring and shortcuts for and/or operators

This commit is contained in:
Manuel Simon Hirsig
2016-07-29 11:39:59 +02:00
parent e69fa45826
commit 5e3138c9e7
9 changed files with 159 additions and 141 deletions
+4 -2
View File
@@ -284,7 +284,8 @@ function private.start_real_time_scan(query, search, continuation)
if not ignore_page then
if search.auto_buy then
ctrl.suspend()
Aux.place_bid('list', auction_record.index, auction_record.buyout_price, function() ctrl.resume(true) end)
Aux.place_bid('list', auction_record.index, auction_record.buyout_price, Aux.f(ctrl.resume, true))
Aux.control.new_thread(Aux.control.sleep, 10, Aux.f(ctrl.resume, false))
else
tinsert(new_records, auction_record)
end
@@ -376,7 +377,8 @@ function private.start_search(queries, continuation)
on_auction = function(auction_record, ctrl)
if search.auto_buy then
ctrl.suspend()
Aux.place_bid('list', auction_record.index, auction_record.buyout_price, function() ctrl.resume(true) end)
Aux.place_bid('list', auction_record.index, auction_record.buyout_price, Aux.f(ctrl.resume, true))
Aux.control.new_thread(Aux.control.sleep, 10, Aux.f(ctrl.resume, false))
elseif getn(search.records) < 1000 then
tinsert(search.records, auction_record)
if getn(search.records) == 1000 then