CymChad / CymChad/BaseRecyclerViewAdapterHelper
利用DiffUtil setDiffNewData 列表不刷新
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 24.6k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
我这边有个现象 我现在adapter已经设置了一个三个元素的数组 然后我又创建一个4个元素的数组 这四个元素后三个和第一个数组内的元素数据相同 只有第一个不同 通过diffutil设置进去 后Diffutil计算出来是没有变化 列表不更新
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the setDiffNewData entry point and reproduce the reported case: replace a three-element array with a four-element array whose last three elements match and whose first differs. Confirm why DiffUtil reports no change, then verify that the list refreshes correctly for this scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100