Repository navigation
Sources: keep source-list focus on the top row while results arrive - #807
Merged
ProdigyV21 merged 1 commit intoOct 14, 2026
Merged
Conversation
Since 7052288 the source list followed the focused source instead of the focused row, from the moment it opened. Results keep arriving and are sorted in above it, so focus rode the first row down the list. With Telegram's "search when clicking" row - often the only row when the picker opens, and always last - every source list opened scrolled to the bottom on the Telegram row. Focus is a row position again, as before 7052288: the list opens on the top row and stays there while results arrive. The commit's other changes are kept (measured smooth scrolling, stable row keys, no re-wrapping release names, reading the current index for repeated key presses). The two device tests for the source-following focus are replaced by one that keeps focus on the top row while results arrive above a trailing action row.
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.
Summary
Since 7052288 ("stabilize focus and animate source scrolling") the source list follows the focused source instead of the focused row, starting the moment it opens. Results keep arriving and are sorted in above the first row, so focus rides that row down the list.
With Telegram connected and "search Telegram when clicking" on, the picker usually opens with only the trailing "Search Telegram" row, which always stays last. Every source list then ended up scrolled to the bottom with focus on that row, and the user had to scroll back up to reach the actual sources.
This restores row-position focus as it was before 7052288: the list opens on the top row and stays there while results arrive.
Everything else from 7052288 is kept:
Trade-off
After the user has moved down, results that arrive above the cursor can shift a different source under it — the pre-7052288f behaviour. That only happens while results are still streaming in. Opening on the bottom row affected every title for Telegram users.
Testing
./gradlew :app:testSideloadDebugUnitTestpasses.SourceScrollingDeviceTeston an Android TV emulator (API 30):arrivingSourcesDoNotReplaceTheFocusedSourceandfirstSourceKeepsFocusWhileMoreResultsArrivetest the removed behaviour, so they are replaced byfocusStaysOnTheTopRowWhileResultsArrive, which covers results arriving above a trailing action row.mainthe way the bug looks: focus ends on the trailing row.addonFiltersResetAndReturnFocusWithoutStickingfails identically on unmodifiedmain, so it is pre-existing and unrelated.