From c4b0969a9d95c005752406bfbab95a2f5b789a30 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Fri, 12 Jul 2024 09:11:32 +0400 Subject: [PATCH] Update Drawer Sample #4 --- samples/drawer-sample4.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/samples/drawer-sample4.lua b/samples/drawer-sample4.lua index 7cdc30a..4836870 100644 --- a/samples/drawer-sample4.lua +++ b/samples/drawer-sample4.lua @@ -8,19 +8,10 @@ function on_drawer_open() end function on_icons_ready(icons) - names = map(pkgs, function(it) return apps:name(it) end) + names = map(function(it) return apps:name(it) end, pkgs) drawer:show_list(names, icons, nil, true) end function on_click(idx) apps:launch(pkgs[idx]) end - -function map(tbl, f) - local ret = {} - for k,v in pairs(tbl) do - ret[k] = f(v) - end - return ret -end -