Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
limuyang committed Jan 8, 2020
1 parent 47bdfba commit 97f25d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ abstract class BaseProviderMultiAdapter<T>(data: MutableList<T>? = null) :

protected open fun bindChildClick(viewHolder: BaseViewHolder, viewType: Int) {
if (getOnItemChildClickListener() == null) {
val provider = mItemProviders.get(viewType)
val provider = getItemProvider(viewType) ?: return
val ids = provider.getChildClickViewIds()
ids.forEach { id ->
viewHolder.itemView.findViewById<View>(id)?.let {
Expand All @@ -134,7 +134,7 @@ abstract class BaseProviderMultiAdapter<T>(data: MutableList<T>? = null) :
}
}
if (getOnItemChildLongClickListener() == null) {
val provider = mItemProviders.get(viewType)
val provider = getItemProvider(viewType) ?: return
val ids = provider.getChildLongClickViewIds()
ids.forEach { id ->
viewHolder.itemView.findViewById<View>(id)?.let {
Expand Down

0 comments on commit 97f25d3

Please sign in to comment.