diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-12-07 16:57:05 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-12-07 17:00:30 +1100 |
| commit | 3f7f199cb940c8d5f6d48f77fd59971adffe49ef (patch) | |
| tree | aa22162e46c5e9ccce4c7ee8537b493f437664d9 /lua | |
| parent | 009f69c929eb1d1b65d75b0937fbf3b8de5d9148 (diff) | |
| download | tangara-fw-3f7f199cb940c8d5f6d48f77fd59971adffe49ef.tar.gz | |
Remove pre-iterator concepts
- No more IndexRecord/Result/dbGetPage nonsense
- Queue is just track ids
- i am so tired and have so much to do
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/browser.lua | 6 | ||||
| -rw-r--r-- | lua/main_menu.lua | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lua/browser.lua b/lua/browser.lua index 415e5dbb..b9a17af5 100644 --- a/lua/browser.lua +++ b/lua/browser.lua @@ -115,13 +115,15 @@ function browser.create(opts) btn:onevent(lvgl.EVENT.FOCUSED, function() screen.focused_item = this_item if screen.last_item - 5 < this_item then - opts.iterator:next(screen.add_item) + screen.add_item(opts.iterator()) end end) end for _ = 1, 8 do - opts.iterator:next(screen.add_item) + local val = opts.iterator() + if not val then break end + screen.add_item(val) end return screen diff --git a/lua/main_menu.lua b/lua/main_menu.lua index c2d052a3..32386266 100644 --- a/lua/main_menu.lua +++ b/lua/main_menu.lua @@ -34,7 +34,7 @@ return function() end) local indexes = database.indexes() - for id, idx in ipairs(indexes) do + for _, idx in ipairs(indexes) do local btn = menu.list:add_btn(nil, tostring(idx)) btn:onClicked(function() backstack.push(function() |
