Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quickplay support to search results #1456

Merged
merged 7 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions components/search/SearchResults.brs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ function onKeyEvent(key as string, press as boolean) as boolean
else if key = "right"
m.searchSelect.setFocus(true)
return true
else if key = "play"
print "play was pressed from search results"
if m.searchSelect.rowItemFocused <> invalid
cewert marked this conversation as resolved.
Show resolved Hide resolved
m.top.quickPlayNode = m.searchSelect.content.getChild(m.searchSelect.rowItemFocused[0]).getChild(m.searchSelect.rowItemFocused[1])
return true
end if
end if
return false

Expand Down
1 change: 1 addition & 0 deletions source/ShowScenes.brs
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ end function
function CreateSearchPage()
' Search + Results Page
group = CreateObject("roSGNode", "searchResults")
group.observeField("quickPlayNode", m.port)
options = group.findNode("searchSelect")
options.observeField("itemSelected", m.port)

Expand Down