From 3490cceb6b94ffbc947b699c8495cf8500e65b98 Mon Sep 17 00:00:00 2001 From: ailurux Date: Fri, 27 Sep 2024 16:59:59 +1000 Subject: Added listened indicator for audiobooks and podcasts --- lua/widgets.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lua/widgets.lua') diff --git a/lua/widgets.lua b/lua/widgets.lua index 8112b656..cfcaf628 100644 --- a/lua/widgets.lua +++ b/lua/widgets.lua @@ -313,7 +313,11 @@ function widgets.InfiniteList(parent, iterator, opts) add_to_top = true end if this_item > last_index then last_index = index end - local btn = infinite_list.root:add_btn(nil, tostring(item)) + local icon = nil + if opts.get_icon then + icon = opts.get_icon(item) + end + local btn = infinite_list.root:add_btn(icon, tostring(item)) if add_to_top then btn:move_to_index(0) end -- cgit v1.2.3