CymChad / CymChad/BaseRecyclerViewAdapterHelper

BaseProviderMultiAdapter 中bindClick()方法的问题

Open
#3,399 0 comments 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

我这里有需求重写了getItemProvider(viewType)方法,需要对viewType进行位运算操作,但是bindClick()方法中获取Provider并没有通过调用getItemProvider(viewType)方法,而是直接mItemProviders.get(viewType),导致bindClick()方法错误,bindClick()方法中获取Provider应该通过getItemProvider(viewType)才对,希望作者修改一下

image
image

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 in BaseProviderMultiAdapter.bindClick() and compare how it obtains the provider with getItemProvider(viewType). The issue is done when bindClick() uses getItemProvider(viewType), including for subclasses that apply bitwise operations to viewType; verify the affected click behavior with the existing project checks if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.