This commit is contained in:
Jean-Patrick Guerrero 2021-06-26 05:29:49 +02:00
parent b24411b189
commit c7987a6c72

View File

@ -631,11 +631,11 @@ end
local function sort_by_category(data) local function sort_by_category(data)
reset_compression(data) reset_compression(data)
local items = copy(data.items_raw) local items = data.items_raw
if data.filter ~= "" then if data.filter ~= "" then
search(data) search(data)
items = copy(data.items) items = data.items
end end
local new = {} local new = {}
@ -2301,6 +2301,10 @@ local function reset_data(data)
data.export_usg = nil data.export_usg = nil
data.alt_items = nil data.alt_items = nil
data.items = data.items_raw data.items = data.items_raw
if data.current_itab > 1 then
sort_by_category(data)
end
end end
local function rcp_fields(player, data, fields) local function rcp_fields(player, data, fields)
@ -2327,6 +2331,10 @@ local function rcp_fields(player, data, fields)
search(data) search(data)
if data.current_itab > 1 then
sort_by_category(data)
end
elseif fields.prev_page or fields.next_page then elseif fields.prev_page or fields.next_page then
if data.pagemax == 1 then return end if data.pagemax == 1 then return end
data.pagenum = data.pagenum - (fields.prev_page and 1 or -1) data.pagenum = data.pagenum - (fields.prev_page and 1 or -1)
@ -3275,6 +3283,8 @@ if progressive_mode then
end end
data.items_raw = items data.items_raw = items
data.current_itab = 1
search(data) search(data)
set_fs(player) set_fs(player)
end end