CymChad / CymChad/BaseRecyclerViewAdapterHelper
3.0.4版本DiffUtil,如果只修改了其中一个Item的某个字段的内容,则不会刷新页面。
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 24.6k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
3.0.4版本DiffUtil,如果只修改了其中一个Item的某个字段的内容,则不会刷新页面。DiffCallBack中areContentsTheSame方法返回内容相同,而且oldItem和newItem的数据尽然都是修改过后的。
如图,已经修改了amount字段从3522到352,但日志显示新旧数据尽然都是修改后的352。
DiffCallback:
设置数据(result为数据库获取的结果):
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
The report concerns Android DiffUtil, DiffCallBack.areContentsTheSame, the amount field, and data returned from a database. Start by reproducing the single-field update described in the issue and inspect the old and new item values during comparison; done means the changed item refreshes and the comparison receives distinguishable old and new data.
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