CymChad / CymChad/BaseRecyclerViewAdapterHelper

二级列表使用setList更新adapter导致源数据被更改

Open
#3,685 1 comment 0 reactions 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

1.点击一级列表item,获取二级列表数据;
2.设置二级列表adapter,使用setList更新adapter。
至此,只要调用过一次setList,就会导致源数据的二级数据错乱。

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

Reproduce the issue by selecting a first-level item, obtaining its second-level data, and updating the second-level adapter with setList. Trace how setList handles the supplied nested data; done means the original second-level source data remains unchanged after the update.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.