summaryrefslogtreecommitdiff
path: root/lua/browser.lua
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-02-05 11:02:45 +1100
committerjacqueline <me@jacqueline.id.au>2024-02-05 11:03:52 +1100
commit299f3cc48f683d3e6dec1efb4957fdb49b4de2c3 (patch)
tree6eb0445c300492e53cdc048f12cc6780a12c55eb /lua/browser.lua
parent811c335c2ac425320a1949ab23378172e86ae60a (diff)
downloadtangara-fw-299f3cc48f683d3e6dec1efb4957fdb49b4de2c3.tar.gz
Preserve the queue when going into standby
Diffstat (limited to 'lua/browser.lua')
-rw-r--r--lua/browser.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/browser.lua b/lua/browser.lua
index 49088389..a7f0c336 100644
--- a/lua/browser.lua
+++ b/lua/browser.lua
@@ -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)