Optimize default drawer scripts

This commit is contained in:
Evgeny
2023-07-19 14:00:35 +04:00
parent 43328239c9
commit d098a0f84d
3 changed files with 34 additions and 0 deletions

View File

@@ -22,6 +22,10 @@ function on_drawer_open()
sort_by_name(phone:contacts())
)
if #contacts == #drawer:items() then
return
end
names = map(contacts, function(it) return it.name end)
keys = map(contacts, function(it) return it.lookup_key end)