CymChad / CymChad/BaseRecyclerViewAdapterHelper
为什么调用局部刷新依然会整体刷新
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 24.6k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
/**
* change data
* 改变某一位置数据
*/
open fun setData(@IntRange(from = 0) index: Int, data: T) {
if (index >= this.data.size) {
return
}
this.data[index] = data
notifyItemChanged(index + headerLayoutCount)
}
数据是通过setList 添加的。
打印了下日志,还是所有的数据都刷新了
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 setData and the setList call path, then trace the adapter notification behavior around notifyItemChanged(index + headerLayoutCount). Reproduce the reported logging and compare which items refresh; done means identifying why unrelated data refreshes and documenting the expected usage or behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100