Preserve the queue when going into standby

This commit is contained in:
jacqueline
2024-02-05 11:03:52 +11:00
parent 811c335c2a
commit 299f3cc48f
12 changed files with 189 additions and 40 deletions
+4
View File
@@ -5,6 +5,7 @@ local font = require("font")
local queue = require("queue")
local playing = require("playing")
local theme = require("theme")
local playback = require("playback")
local browser = {}
@@ -67,12 +68,14 @@ function browser.create(opts)
local enqueue = widgets.IconBtn(buttons, "//lua/img/enqueue.png", "Enqueue")
enqueue:onClicked(function()
queue.add(original_iterator)
playback.playing:set(true)
end)
-- enqueue:add_flag(lvgl.FLAG.HIDDEN)
local play = widgets.IconBtn(buttons, "//lua/img/play_small.png", "Play")
play:onClicked(function()
queue.clear()
queue.add(original_iterator)
playback.playing:set(true)
backstack.push(playing)
end
)
@@ -109,6 +112,7 @@ function browser.create(opts)
else
queue.clear()
queue.add(contents)
playback.playing:set(true)
backstack.push(playing)
end
end)