* Refactor long press

* Lint fix

* Queue UI, refactor PlayQueue to use ContentNode

* Add queue notification hint

* Play at index

* Play queue with highlight

* Priority

* Comment

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
Brahim Hadricheandgithub-action linter authored and GitHub committed 2023-11-12 17:45:00 -05:00
1 parent e0709452be
commit 3559a3fff6
24 files changed
+523 -64

No files matched your search

@@ -1,4 +1,6 @@
import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/components/Navigation/LongPress.bs"
import "pkg:/components/PlayQueue/PlayQueueViewUtils.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/Logging.bs"
@@ -10,6 +12,7 @@ function Init()
end function
function OnNodeReady()
InitializeLongPress(["options"])
NodeSetFocus(m.top.root, true)
end function
@@ -78,15 +81,26 @@ function GetRootScreen(screenName as string) as object
end function
function onKeyEvent(key as string, press as boolean) as boolean
if not press
return false
if LongPressHandler(key, press)
return true
end if
if key = "options"
if key = OPTIONS_LONG_PRESS_KEY and press
LogInfo("Opening PlayQueueView")
PlayQueueViewUtils.Open(m.top.playQueue, m.top)
return true
end if
if key = "options" and not press
if VideoUtils.ToggleVideoPictureInPicture()
return true
end if
end if
if not press
return false
end if
if key = "play"
if VideoUtils.TogglePause()
return true
@@ -2,6 +2,7 @@
<interface>
<field id="root" type="node" />
<field id="stack" type="node" />
<field id="playQueue" type="node" />
<function name="PushScreen" />
<function name="PopScreen" />
<function name="FocusTopScreen" />