Fix bug with favs
This commit is contained in:
parent
5d6ce3be18
commit
f2b4c960ad
|
@ -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, data.query_item)
|
||||
insert(data.favs, fmt("_%s", data.query_item))
|
||||
elseif fav then
|
||||
remove(data.favs, fav)
|
||||
end
|
||||
|
|
|
@ -1398,7 +1398,8 @@ local function get_favs(fs, data)
|
|||
label(data.inv_width + 0.4, data.yoffset + 0.4, ES"Bookmarks")
|
||||
|
||||
for i = 1, #data.favs do
|
||||
local item = data.favs[i]
|
||||
local name = data.favs[i]
|
||||
local item = sub(name, 2)
|
||||
local X = data.inv_width - 0.7 + (i * 1.2)
|
||||
local Y = data.yoffset + 0.8
|
||||
|
||||
|
@ -1406,7 +1407,7 @@ local function get_favs(fs, data)
|
|||
image(X, Y, btn_size, btn_size, PNG.slot)
|
||||
end
|
||||
|
||||
item_image_button(X, Y, btn_size, btn_size, item, item, "")
|
||||
item_image_button(X, Y, btn_size, btn_size, item, name, "")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue