From 468e09de75ab7b34dcfbb1d1c5af0fe99aa37184 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sun, 18 Jul 2021 11:30:44 -0400 Subject: [PATCH] fix #1528 again --- .../viewholder/directmessages/DirectItemViewHolder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemViewHolder.java b/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemViewHolder.java index de5b0c37..b0a5a218 100644 --- a/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemViewHolder.java +++ b/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemViewHolder.java @@ -128,7 +128,7 @@ public abstract class DirectItemViewHolder extends RecyclerView.ViewHolder imple private void bindBase(@NonNull final DirectItem item, final MessageDirection messageDirection, final int position) { final FrameLayout.LayoutParams containerLayoutParams = (FrameLayout.LayoutParams) binding.container.getLayoutParams(); - final DirectItemType itemType = item.getItemType(); + final DirectItemType itemType = item.getItemType() == null ? DirectItemType.UNKNOWN : item.getItemType(); setMessageDirectionGravity(messageDirection, containerLayoutParams); setGroupUserDetails(item, messageDirection); setBackground(messageDirection);