Skip to content

Commit c799de0

Browse files
committed
update
1 parent fae450d commit c799de0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adapterDSL/src/main/java/com/glimmer/dsl/adapter/BaseListAdapter.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ abstract class BaseListAdapter<VH : BaseVH<Any, *>>(callback: ItemDiffCallback<A
3434
}
3535

3636
override fun getItemId(position: Int): Long {
37-
return getItem(position).hashCode().toLong()
37+
getItem(position)?.apply {
38+
return hashCode().toLong()
39+
}
40+
return super.getItemId(position)
3841
}
3942

4043
override fun getItemViewType(position: Int): Int {

0 commit comments

Comments
 (0)