Skip to content

Commit 59493b2

Browse files
authored
Merge pull request #930 from Iterable/bugfix/inbox-metadata-null-check
Inbox Metadata null check
2 parents 9c28f44 + 2eccb56 commit 59493b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iterableapi-ui/src/main/java/com/iterable/iterableapi/ui/inbox/IterableInboxAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
7070
IterableInAppMessage.InboxMetadata inboxMetadata = inboxRow.inboxMetadata;
7171

7272
if (holder.title != null) {
73-
holder.title.setText(inboxMetadata.title);
73+
holder.title.setText(inboxMetadata != null && inboxMetadata.title != null ? inboxMetadata.title : "");
7474
}
7575

7676
if (holder.subtitle != null) {
77-
holder.subtitle.setText(inboxMetadata.subtitle);
77+
holder.subtitle.setText(inboxMetadata != null && inboxMetadata.subtitle != null ? inboxMetadata.subtitle : "");
7878
}
7979

80-
if (holder.icon != null) {
80+
if (holder.icon != null && inboxMetadata != null && inboxMetadata.icon != null) {
8181
BitmapLoader.loadBitmap(holder.icon, Uri.parse(inboxMetadata.icon));
8282
}
8383

0 commit comments

Comments
 (0)