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

Implement DiffUtil for OCFileListAdapter #13616

Open
alperozturk96 opened this issue Sep 24, 2024 · 0 comments
Open

Implement DiffUtil for OCFileListAdapter #13616

alperozturk96 opened this issue Sep 24, 2024 · 0 comments

Comments

@alperozturk96
Copy link
Collaborator

alperozturk96 commented Sep 24, 2024

DiffUtil is a utility class that calculates the difference between two lists and outputs a list of update operations that converts the first list into the second one.

Using notifyDataSetChanged() in RecyclerView doesn’t let it track the exact changes. As a result, all visible views are needlessly rebuilt, which is inefficient and time-consuming.

By using DiffUtil, we can compare the old and new lists more efficiently. This way, only the specific items that have changed are updated, avoiding the full rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant