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

Rework RecyclerViews to set adapter once #6971

Merged
merged 6 commits into from
Jan 29, 2025

Conversation

Pittvandewitt
Copy link
Contributor

On most pages, the recyclerview adapter is set on every refresh. By doing this, you basically loose all benefits of a recyclerview. Examples are animations and efficiency in adding items.
By refreshing the subscriptions page, the list will no longer flicker as items that are still the same will no longer be updated.

There are still one or two cases left, but the fragments they live in need some changes outside the scope of this PR before they can be fixed.

@Pittvandewitt
Copy link
Contributor Author

Are you planning on merging this PR? Because I'd rather focus on moving API and database calls to the viewmodel, so that work is performed in the right lifecycle scope.

@Bnyro
Copy link
Member

Bnyro commented Jan 22, 2025

Are you planning on merging this PR? Because I'd rather focus on moving API and database calls to the viewmodel, so that work is performed in the right lifecycle scope.

Yes, sure I am. However I want to merge this after the next release, because this PR also requires some deeper looking-into and testing to prevent bugs.

Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

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

Great job, thank you!

@Bnyro Bnyro merged commit 0cf7abb into libre-tube:master Jan 29, 2025
2 of 3 checks passed
@Pittvandewitt Pittvandewitt deleted the bugfix/recyclerview-adapter branch January 29, 2025 15:06
@Pittvandewitt Pittvandewitt restored the bugfix/recyclerview-adapter branch January 29, 2025 15:22
@Pittvandewitt Pittvandewitt deleted the bugfix/recyclerview-adapter branch January 29, 2025 15:39
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