Skip to content

Commit 1ce1adc

Browse files
committed
Changes the null check to a notEmpty check for imageUrl.
1 parent f9e5c67 commit 1ce1adc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/IterableInAppManager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,11 @@ static void showFullScreenDialog(Context context, JSONObject dialogParameters, S
156156
verticalLayout.addView(imageView);
157157
try {
158158
Class picassoClass = Class.forName(IterableConstants.PICASSO_CLASS);
159-
if (picassoClass != null && dialogParameters.optString(IterableConstants.ITERABLE_IN_APP_MAIN_IMAGE) != null) {
159+
String imageUrl = dialogParameters.optString(IterableConstants.ITERABLE_IN_APP_MAIN_IMAGE);
160+
if (picassoClass != null && !imageUrl.isEmpty()) {
160161
Picasso.
161162
with(context.getApplicationContext()).
162-
load(dialogParameters.optString(IterableConstants.ITERABLE_IN_APP_MAIN_IMAGE)).
163+
load(imageUrl).
163164
resize(dialogWidth, dialogHeight/2).
164165
centerInside().
165166
into(imageView);

0 commit comments

Comments
 (0)