From 44d6ab7685b5dd5b27663594b1097367a8d3c726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Latorre=20Asensio?= Date: Mon, 23 Sep 2024 08:08:27 +0200 Subject: [PATCH] ANDROID-15206 Set icon as null when there is no icon (#387) --- .../java/com/telefonica/mistica/compose/list/ListRowItem.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/telefonica/mistica/compose/list/ListRowItem.kt b/library/src/main/java/com/telefonica/mistica/compose/list/ListRowItem.kt index 3d611682d..7f604fd16 100644 --- a/library/src/main/java/com/telefonica/mistica/compose/list/ListRowItem.kt +++ b/library/src/main/java/com/telefonica/mistica/compose/list/ListRowItem.kt @@ -58,7 +58,7 @@ fun ListRowItem( ) { ListRowItemImp( modifier = modifier, - icon = { listRowIcon?.Draw() }, + icon = listRowIcon?.let { { listRowIcon.Draw() } }, title = title, isTitleHeading = isTitleHeading, subtitle = subtitle, @@ -288,6 +288,10 @@ fun ListRowItemPreview() { MisticaTheme(brand = MovistarBrand) { val checkedState = remember { mutableStateOf(true) } Column { + ListRowItem( + listRowIcon = null, + title = "Title", + ) ListRowItem( listRowIcon = null, headline = Tag("Promo"),