Skip to content

Commit

Permalink
Merge pull request #163 from wongcain/cain_onCancelled-crash-fix
Browse files Browse the repository at this point in the history
Added try-catch
  • Loading branch information
evant authored Aug 14, 2019
2 parents c8953b0 + f2d46ef commit 1a09091
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ public void onCanceled(ViewDataBinding binding) {
}
int position = holder.getAdapterPosition();
if (position != RecyclerView.NO_POSITION) {
notifyItemChanged(position, DATA_INVALIDATION);
try {
notifyItemChanged(position, DATA_INVALIDATION);
} catch (IllegalStateException e) {
// noop - this shouldn't be happening
}
}
}
});
Expand Down

0 comments on commit 1a09091

Please sign in to comment.