fix(tv): re-enable navigation_home nextFocusRight so D-pad can reach the 'None' provider button - #3126
Open
RjBiermann wants to merge 2 commits into
Open
Conversation
…'None' provider button
RjBiermann
marked this pull request as draft
August 16, 2026 17:58
The previous attempt only handled rail-button navigation to home via onNavDestinationSelected. Returning via the back stack (popBackStack) or on first load never re-pointed the rail's nextFocusRightId, so D-pad right from the rail could not reach the 'None' / provider selector button. Move the home case into addOnDestinationChangedListener, which fires on every arrival at home regardless of navigation path (rail button, back stack pop, first load).
RjBiermann
marked this pull request as ready for review
August 16, 2026 18:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2592
Problem
On TV, the D-pad cannot reach the "None" / provider-selector button (
home_change_api) on the home screen. After navigating away from Home and back (via Search/Favorites, the BACK button, or even a fresh load), pressing right from the nav rail does nothing — focus is stuck on the rail.Root cause
onNavDestinationSelected(MainActivity.kt) setsnextFocusRightIdon all nav-rail buttons when navigating to Search/Favorites/Downloads (pointing at e.g.main_search), but thenavigation_homecase was commented out with a stale id. Two problems followed:main_search, so right-focus from the rail was dead.Fix
Move the Home rail-focus handling into
addOnDestinationChangedListener(MainActivity.kt), which fires on every arrival at Home regardless of how you got there:so on every visit to Home, all rail buttons'
nextFocusRightIdpoint at the provider-selector button.Verification
Reproduced on the TV emulator (blank home, "None" selected) across all three arrival paths:
home_change_apihome_change_apiAlso verified with a plugin + home content loaded (StreamPlay): LEFT/RIGHT between rail and provider button works, and DOWN from the provider button drops into content as before.
Notes
home_preview_change_api); the live id ishome_change_api, which exists in bothfragment_home.xmlandfragment_home_tv.xml.<requestFocus />infragment_home_tv.xml; this change additionally makes the rail→provider path work on every arrival.AI note: this change was written with AI assistance per AI-POLICY.md; the logic was reproduced and verified on the TV emulator and every line is understood.