refactoring and default auction duration setting (this update will delete the history)
This commit is contained in:
+6
-5
@@ -16,21 +16,22 @@ local gui = require 'aux.gui'
|
||||
|
||||
local tab = aux.tab 'Post'
|
||||
|
||||
local DURATION_4, DURATION_8, DURATION_24 = 120, 480, 1440
|
||||
local settings_schema = {'tuple', '#', {duration='number'}, {start_price='number'}, {buyout_price='number'}, {hidden='boolean'}}
|
||||
|
||||
local scan_id, inventory_records, bid_records, buyout_records = 0, {}, {}, {}
|
||||
|
||||
M.DURATION_2, M.DURATION_8, M.DURATION_24 = 120, 480, 1440
|
||||
|
||||
refresh = true
|
||||
|
||||
selected_item = nil
|
||||
|
||||
function get_default_settings()
|
||||
return T.map('duration', DURATION_8, 'start_price', 0, 'buyout_price', 0, 'hidden', false)
|
||||
return T.map('duration', aux.account_data.post_duration, 'start_price', 0, 'buyout_price', 0, 'hidden', false)
|
||||
end
|
||||
|
||||
function aux.handle.LOAD2()
|
||||
data = aux.faction_data'post'
|
||||
data = aux.faction_data.post
|
||||
end
|
||||
|
||||
function read_settings(item_key)
|
||||
@@ -206,7 +207,7 @@ function post_auctions()
|
||||
local key = selected_item.key
|
||||
|
||||
local duration_code
|
||||
if duration == DURATION_4 then
|
||||
if duration == DURATION_2 then
|
||||
duration_code = 2
|
||||
elseif duration == DURATION_8 then
|
||||
duration_code = 3
|
||||
@@ -543,7 +544,7 @@ function initialize_duration_dropdown()
|
||||
end
|
||||
UIDropDownMenu_AddButton{
|
||||
text = '2 Hours',
|
||||
value = DURATION_4,
|
||||
value = DURATION_2,
|
||||
func = on_click,
|
||||
}
|
||||
UIDropDownMenu_AddButton{
|
||||
|
||||
+1
-1
@@ -312,7 +312,7 @@ do
|
||||
end
|
||||
|
||||
function aux.handle.LOAD()
|
||||
if not aux_post_bid then
|
||||
if not aux.account_data.post_bid then
|
||||
frame.bid_listing:Hide()
|
||||
frame.buyout_listing:SetPoint('BOTTOMLEFT', frame.inventory, 'BOTTOMRIGHT', 2.5, 0)
|
||||
buyout_listing:SetColInfo{
|
||||
|
||||
@@ -268,7 +268,7 @@ do
|
||||
end
|
||||
do
|
||||
local editbox = gui.editbox(frame.filter)
|
||||
editbox.complete_item = completion.complete(function() return aux_auctionable_items end)
|
||||
editbox.complete_item = completion.complete(function() return aux.account_data.auctionable_items end)
|
||||
editbox:SetPoint('TOPLEFT', 14, -FILTER_SPACING)
|
||||
editbox:SetWidth(260)
|
||||
editbox.char = function()
|
||||
|
||||
@@ -5,8 +5,8 @@ local aux = require 'aux'
|
||||
local filter_util = require 'aux.util.filter'
|
||||
local gui = require 'aux.gui'
|
||||
|
||||
function aux.handle.LOAD2()
|
||||
recent_searches, favorite_searches = aux.realm_data'recent_searches', aux.realm_data'favorite_searches'
|
||||
function aux.handle.LOAD()
|
||||
recent_searches, favorite_searches = aux.realm_data.recent_searches, aux.realm_data.favorite_searches
|
||||
end
|
||||
|
||||
function update_search_listings()
|
||||
|
||||
Reference in New Issue
Block a user