diff --git a/manage_frame.lua b/manage_frame.lua
index 1acde77..e1ad9c9 100644
--- a/manage_frame.lua
+++ b/manage_frame.lua
@@ -5,16 +5,16 @@ local bid_records, auction_records, create_bid_record, create_auction_record, up
local position
local bid_listing_config = {
- on_cell_click = function (sheet, row_index, column_index)
+ on_cell_click = function(sheet, row_index, column_index)
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
AuxBuyEntry_OnClick(sheet.data[data_index])
end,
- on_cell_enter = function (sheet, row_index, column_index)
+ on_cell_enter = function(sheet, row_index, column_index)
sheet.rows[row_index].highlight:SetAlpha(.5)
end,
- on_cell_leave = function (sheet, row_index, column_index)
+ on_cell_leave = function(sheet, row_index, column_index)
sheet.rows[row_index].highlight:SetAlpha(0)
end,
columns = {
@@ -349,7 +349,7 @@ function update_bid_records(k)
position = nil
end,
on_page_loaded = function(page, total_pages)
- Aux.log('Scanning bid page '..(page+1)..' out of '..total_pages..' ...')
+ Aux.log('Scanning bid page '..(page+1)..' out of '..total_pages..' ...')
position = 'bids#'..page
end,
on_read_auction = function(i)
@@ -379,7 +379,7 @@ function update_auction_records(k)
position = nil
end,
on_page_loaded = function(page, total_pages)
- Aux.log('Scanning auction page '..(page+1)..' out of '..total_pages..' ...')
+ Aux.log('Scanning auction page '..(page+1)..' out of '..total_pages..' ...')
position = 'auctions#'..page
end,
on_read_auction = function(i)
diff --git a/manage_frame.xml b/manage_frame.xml
index 4803300..68bb16c 100644
--- a/manage_frame.xml
+++ b/manage_frame.xml
@@ -16,7 +16,7 @@
-
+
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
@@ -106,9 +106,9 @@
-
+
-
+
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
diff --git a/scan.lua b/scan.lua
index 503d5bb..e1040d9 100644
--- a/scan.lua
+++ b/scan.lua
@@ -47,9 +47,7 @@ end
function wait_for_results(k)
local ok
if state.job.type == 'bidder' then
- Aux.control.on_next_event('AUCTION_BIDDER_LIST_UPDATE', function()
- ok = true
- end)
+ ok = true
elseif state.job.type == 'owner' then
Aux.control.on_next_event('AUCTION_OWNED_LIST_UPDATE', function()
ok = true
@@ -146,9 +144,13 @@ function submit_query(k)
--wait_for_owner_data(function()
local _, total_count = GetNumAuctionItems(state.job.type)
state.total_pages = math.ceil(total_count / PAGE_SIZE)
- wait_for_callback{state.job.on_page_loaded, state.page, state.total_pages, function()
- k()
- end}
+ if total_pages >= state.page + 1 then
+ wait_for_callback{state.job.on_page_loaded, state.page, state.total_pages, function()
+ return k()
+ end}
+ else
+ return k()
+ end
-- end)
end)
if state.job.type == 'bidder' then