CymChad / CymChad/BaseRecyclerViewAdapterHelper

removeAt 方法 的notifyItemChanged的异常

Open
#3,463 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
24.6k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

image
圈出来的参数应该改为position,不然在有header的时候会越界。
另外比如在删除第零个数据(不包括header)的时候,最后个数据不会被更新。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the removeAt method and its notifyItemChanged call described in issue #3463. Reproduce the behavior with a header, then remove the first data item; done means no out-of-bounds access and the final data item is updated correctly.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.