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

Improve: remove unnecessary notifyDataSetChanged for ListAdapter #4255

Conversation

Obolrom
Copy link
Contributor

@Obolrom Obolrom commented Sep 19, 2024

Description

It makes code cleaner and more effective.
Calling ListAdapter::notifyDataSetChanged is a bad practice, because ListAdapter::submitList under the hood knows what should be updated.
Making Recyclerview Efficient using List Adapter and DiffUtil medium article linke

Manual tests

  • Done

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

@Obolrom
Copy link
Contributor Author

Obolrom commented Sep 19, 2024

@VishalNehra @VishnuSanal
What do you think?

@VishnuSanal
Copy link
Member

very insignificant change, yet appreciate your contribution. please revert the changes unrelated to the commit message - i.e, scope reduction of recyclerview variable.

@VishnuSanal VishnuSanal added the pr-requested-changes this PR is awaiting an update from the author label Sep 29, 2024
@VishnuSanal VishnuSanal added pr-awaiting-final-review this PR is awaiting a final review/approval and removed pr-requested-changes this PR is awaiting an update from the author labels Sep 29, 2024
@VishalNehra VishalNehra merged commit 0ee6b54 into TeamAmaze:release/4.0 Oct 8, 2024
2 of 3 checks passed
@VishalNehra VishalNehra added this to the v4.0 milestone Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-awaiting-final-review this PR is awaiting a final review/approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants