Change contacts and apps modules APIs

This commit is contained in:
Evgeny
2023-09-20 19:12:53 +04:00
parent bc003712ff
commit 52e27e22a0
3 changed files with 29 additions and 23 deletions

View File

@@ -28,16 +28,15 @@ function on_drawer_open()
names = map(contacts, function(it) return it.name end)
keys = map(contacts, function(it) return it.lookup_key end)
icons = map(contacts, function(it) return it.name:sub(1,1) end)
icons = map(contacts, function(it)
if it.icon ~= nil then
return it.icon
else
return it.name:sub(1,1) -- Backward compatibility
end
end)
drawer:show_list(names, icons, nil, true)
-- Uncomment this if you want to use real icons (slow)
--phone:request_icons(keys)
end
function on_icons_ready(icons)
drawer:show_list(names, icons, nil, true)
end
function on_click(idx)