Skip to content

Auto-scroll to first non-empty search item in case of pinned providers.#2546

Open
hsp1020 wants to merge 1 commit intorecloudstream:masterfrom
hsp1020:master
Open

Auto-scroll to first non-empty search item in case of pinned providers.#2546
hsp1020 wants to merge 1 commit intorecloudstream:masterfrom
hsp1020:master

Conversation

@hsp1020
Copy link
Copy Markdown
Contributor

@hsp1020 hsp1020 commented Mar 1, 2026

This PR re-submits the changes from #2507, which was closed because the head repository was deleted.

@hsp1020
Copy link
Copy Markdown
Contributor Author

hsp1020 commented Apr 7, 2026

I opened this PR several weeks ago, but haven't received any feedback yet. Is there a reason for the delay? I'd appreciate it if you could let me know when you might be able to review it. Thanks.

@fire-light42
Copy link
Copy Markdown
Collaborator

Sorry, there have simply been too many pull requests for me to review everything in a timely manner.

Copy link
Copy Markdown
Collaborator

@fire-light42 fire-light42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, but requires refinement for a better UX.


firstChild?.let { view ->
view.isFocusableInTouchMode = true
view.requestFocus()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not focus the item unless necessary. This steals focus from the user on a TV, and it focuses when the user is on a phone (which should never happen).


masterRecycler.post {
try {
masterRecycler.scrollToPosition(firstNonEmptyIndex)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it impossible for users to scroll down while the results are loading. Make sure the user inputs take precedence over anything you are doing automatically.

This is best tested by installing many providers, you will see it becomes impossible to do anything while new results appear.

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.

2 participants