Prevent crash

This commit is contained in:
M66B 2020-03-29 14:01:35 +02:00
parent 0557b305ff
commit c98177c6ff
1 changed files with 4 additions and 0 deletions

View File

@ -5087,6 +5087,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
public void collapse(@NonNull ViewHolder holder, int position) {
int type = holder.getItemViewType();
if (type != R.layout.item_message_compact && type != R.layout.item_message_normal)
return;
TupleMessageEx message = getItemAtPosition(position);
if (message != null)
holder.clearExpanded(message);