Skip to content

Conversation

@y-hbb
Copy link
Contributor

@y-hbb y-hbb commented Jan 20, 2026

Adds random play functionality to the TV interface, addressing feature parity with the phone layout. Users can now play random content from the Home and Library screens using buttons in the top toolbar.

Changes:

  • Add random button to Home TV toolbar (between search and account)
  • Add random button to Library TV toolbar (after search field)
  • Enable "Random Button" setting visibility for TV users
  • Add placeholder views in phone layouts for ViewBinding compatibility
  • Implement dynamic focus chain updates for proper D-pad navigation
  • Extract shared click handlers to reduce code duplication

Technical details:

  • Use defensive .toList() copy before .random() to prevent race conditions
  • Dynamically update nextFocusRightId/nextFocusLeftId when button visibility changes
  • Reset focus chain when button is hidden to maintain proper TV navigation

Code and commit generated using AI. Let me know if you need me test anything.

Closes #2347

TV
Library:
image

Home:
image

Phone
Library:
image

Home:
image

Adds random play functionality to the TV interface, addressing feature
parity with the phone layout. Users can now play random content from
the Home and Library screens using buttons in the top toolbar.

Changes:
- Add random button to Home TV toolbar (between search and account)
- Add random button to Library TV toolbar (after search field)
- Enable "Random Button" setting visibility for TV users
- Add placeholder views in phone layouts for ViewBinding compatibility
- Implement dynamic focus chain updates for proper D-pad navigation
- Extract shared click handlers to reduce code duplication

Technical details:
- Use defensive .toList() copy before .random() to prevent race conditions
- Dynamically update nextFocusRightId/nextFocusLeftId when button visibility
changes
- Reset focus chain when button is hidden to maintain proper TV navigation

Code and commit generated using AI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Play random media in TV

1 participant