Skip to content

Commit d4085ec

Browse files
committed
fix bug cause by null opinion
1 parent 32354a0 commit d4085ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

diffadapter/src/main/java/com/silencedut/diffadapter/DiffAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,10 @@ public void onBindViewHolder(@NonNull BaseDiffViewHolder holder, int position, @
519519
}
520520
}
521521
}
522-
if (diffPayloads.isEmpty() && payloadKeys!=null && payloadKeys.isEmpty()) {
522+
if (payloadKeys ==null || (diffPayloads.isEmpty() && payloadKeys.isEmpty())) {
523523
this.onBindViewHolder(holder, position);
524524
} else {
525-
if (payloadKeys!=null && payloadKeys.isEmpty()) {
525+
if (payloadKeys.isEmpty()) {
526526
holder.updatePartWithPayload(mDatas.get(position), diffPayloads, position);
527527
} else {
528528
holder.updatePartWithPayload(mDatas.get(position), payloadKeys, position);

0 commit comments

Comments
 (0)