修改 DiffUtil.DiffResult 为参数的 setDiffNewData 方法 #3688
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.
这个方法中,this.data = list 是在 diffResult.dispatchUpdatesTo 之后调用的,请问这个调用顺序是有什么特殊作用吗?
我的理解这会导致 adapter.notify 系列方法触发时,数据源(this.data)依然是旧的,所以提个合并请求。
Thank you for contributing to BaseRecyclerViewAdapterHelper. Before pressing the "Create Pull Request" button, please consider the following points:
[1] Please give a description about what and why you are contributing, even if it's trivial.
[2] Please include the issue list number(s) or other PR numbers in the description if you are contributing in response to those.
[3] Please include a reasonable set of demo tests if you contribute new code or change an existing one. please make sure you have demo for working correctly.