Minor cleaning

This commit is contained in:
Jean-Patrick Guerrero 2022-06-23 13:04:19 +02:00
parent f2b4c960ad
commit 72d4a5d4b8
2 changed files with 3 additions and 4 deletions

View File

@ -369,7 +369,7 @@ local function rcp_fields(player, data, fields)
local fav = is_fav(data)
if #data.favs < i3.settings.max_favs and not fav then
insert(data.favs, fmt("_%s", data.query_item))
insert(data.favs, data.query_item)
elseif fav then
remove(data.favs, fav)
end

View File

@ -1397,9 +1397,8 @@ local function get_favs(fs, data)
local btn_size = i3.settings.item_btn_size
label(data.inv_width + 0.4, data.yoffset + 0.4, ES"Bookmarks")
for i = 1, #data.favs do
local name = data.favs[i]
local item = sub(name, 2)
for i, item in ipairs(data.favs) do
local name = fmt("_%s", item)
local X = data.inv_width - 0.7 + (i * 1.2)
local Y = data.yoffset + 0.8