Skip to content

Commit

Permalink
Fix messages not displaying if badges were null
Browse files Browse the repository at this point in the history
  • Loading branch information
samfundev committed May 20, 2023
1 parent 489ba60 commit be731fc
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -95,6 +95,8 @@ public void onBindViewHolder(@NonNull final ContactViewHolder holder, int positi
if (!message.systemMessage.isEmpty()) builder.append('\n');

for (Badge badge : message.getBadges()) {
if (badge == null) { continue; }

final GlideImageSpan badgeSpan = new GlideImageSpan(context, badge.getUrl(2), holder.message, 36, 1, badge.color);
appendSpan(builder, " ", badgeSpan).append(" ");
}
Expand Down

0 comments on commit be731fc

Please sign in to comment.