Skip to content

Commit ce47f49

Browse files
PrimaryActionList size check is removed as secondary action can exist without primary. (#6319)
Co-authored-by: almedina-ms <[email protected]>
1 parent 4aa4651 commit ce47f49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/ActionLayoutRenderer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ public View renderActions(
4949
HostConfig hostConfig,
5050
RenderArgs renderArgs) throws AdaptiveFallbackException
5151
{
52-
long size;
53-
if (baseActionElementList == null || (size = baseActionElementList.size()) <= 0)
52+
53+
if (baseActionElementList == null)
5454
{
5555
return null;
5656
}
5757

58+
long size = baseActionElementList.size();
59+
5860
LinearLayout actionButtonsLayout = new LinearLayout(context);
5961
actionButtonsLayout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
6062
int alignment = hostConfig.GetActions().getActionAlignment().swigValue();

0 commit comments

Comments
 (0)