Skip to content

Commit dad16df

Browse files
authored
Merge pull request #16 from Iterable/bugfix/ITBL-2730-fix-in-app-button
Fix for button click not working with an empty action.
2 parents 90d4d3d + b8062c5 commit dad16df

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,7 @@ private static View createButtons(Context context, Dialog dialog, JSONArray butt
243243
final Button button = new Button(context);
244244
button.setBackgroundColor(getIntColorFromJson(buttonJson, IterableConstants.ITERABLE_IN_APP_BACKGROUND_COLOR, Color.LTGRAY));
245245
String action = buttonJson.optString(IterableConstants.ITERABLE_IN_APP_BUTTON_ACTION);
246-
if (!action.isEmpty()) {
247-
button.setOnClickListener(new IterableInAppActionListener(dialog, i, action, messageId, clickCallback));
248-
}
246+
button.setOnClickListener(new IterableInAppActionListener(dialog, i, action, messageId, clickCallback));
249247

250248
JSONObject textJson = buttonJson.optJSONObject(IterableConstants.ITERABLE_IN_APP_CONTENT);
251249
button.setTextColor(getIntColorFromJson(textJson, IterableConstants.ITERABLE_IN_APP_COLOR, Color.BLACK));

0 commit comments

Comments
 (0)