From e30c1a3773cbd8cb9e3df39e9247dab67e1dd0c6 Mon Sep 17 00:00:00 2001 From: Florent Maitre Date: Wed, 20 Sep 2023 12:19:15 +0200 Subject: [PATCH] [#624] Update code implementation after rebase --- .../com/orange/ods/app/ui/components/chips/Chip.kt | 6 +++--- .../orange/ods/app/ui/components/chips/ChipFilter.kt | 2 +- .../ComponentFloatingActionButton.kt | 2 +- .../app/ui/components/imagetile/ComponentImageTile.kt | 10 +++++----- .../ods/app/ui/components/progress/ProgressLinear.kt | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/orange/ods/app/ui/components/chips/Chip.kt b/app/src/main/java/com/orange/ods/app/ui/components/chips/Chip.kt index 28a771c68..dbbbd51f4 100644 --- a/app/src/main/java/com/orange/ods/app/ui/components/chips/Chip.kt +++ b/app/src/main/java/com/orange/ods/app/ui/components/chips/Chip.kt @@ -135,7 +135,7 @@ private fun Chip(chipCustomizationState: ChipCustomizationState) { lambda("onValueChange") list("chips") { recipes.forEachIndexed { index, recipe -> - classInstance(OdsChoiceChip::class.java) { + classInstance> { text(recipe.title) stringRepresentation("value", index) if (!isEnabled) enabled(false) @@ -175,13 +175,13 @@ private fun Chip(chipCustomizationState: ChipCustomizationState) { parameters = { text(recipe?.title.orEmpty()) if (isActionChip || hasLeadingIcon) { - classInstance("leadingIcon", OdsChipLeadingIcon::class.java) { + classInstance("leadingIcon") { painter() contentDescription("") } } if (hasLeadingAvatar) { - classInstance("leadingAvatar", OdsChipLeadingAvatar::class.java) { + classInstance("leadingAvatar") { image() contentDescription("") } diff --git a/app/src/main/java/com/orange/ods/app/ui/components/chips/ChipFilter.kt b/app/src/main/java/com/orange/ods/app/ui/components/chips/ChipFilter.kt index d12945744..1d7cfb0e3 100644 --- a/app/src/main/java/com/orange/ods/app/ui/components/chips/ChipFilter.kt +++ b/app/src/main/java/com/orange/ods/app/ui/components/chips/ChipFilter.kt @@ -109,7 +109,7 @@ fun ChipFilter() { parameters = { text(ingredient.food.name) if (hasLeadingAvatar) { - classInstance("leadingAvatar", OdsChipLeadingAvatar::class.java) { + classInstance("leadingAvatar") { image() contentDescription("") } diff --git a/app/src/main/java/com/orange/ods/app/ui/components/floatingactionbuttons/ComponentFloatingActionButton.kt b/app/src/main/java/com/orange/ods/app/ui/components/floatingactionbuttons/ComponentFloatingActionButton.kt index 502f78b6d..721e441fb 100644 --- a/app/src/main/java/com/orange/ods/app/ui/components/floatingactionbuttons/ComponentFloatingActionButton.kt +++ b/app/src/main/java/com/orange/ods/app/ui/components/floatingactionbuttons/ComponentFloatingActionButton.kt @@ -122,7 +122,7 @@ fun ComponentFloatingActionButton() { name = usedComponentName, exhaustiveParameters = false, parameters = { - classInstance("icon", OdsFloatingActionButtonIcon::class.java) { + classInstance("icon") { painter() contentDescription("") } diff --git a/app/src/main/java/com/orange/ods/app/ui/components/imagetile/ComponentImageTile.kt b/app/src/main/java/com/orange/ods/app/ui/components/imagetile/ComponentImageTile.kt index 335b04d3e..d948f6090 100644 --- a/app/src/main/java/com/orange/ods/app/ui/components/imagetile/ComponentImageTile.kt +++ b/app/src/main/java/com/orange/ods/app/ui/components/imagetile/ComponentImageTile.kt @@ -145,21 +145,21 @@ fun ComponentImageTile() { name = OdsComposable.OdsImageTile.name, exhaustiveParameters = false, parameters = { - stringRepresentation("legendAreaDisplayType", type.value) + enum("legendAreaDisplayType", type.value) if (hasText) title(recipe.title) - classInstance("image", OdsImageTileImage::class.java) { + classInstance("image") { painter() contentDescription("") } if (hasIcon) { - classInstance("icon", OdsImageTileIconToggleButton::class.java) { + classInstance("icon") { checked(iconChecked) lambda("onCheckedChange") - classInstance("uncheckedIcon", OdsIconButtonIcon::class.java) { + classInstance("uncheckedIcon") { painter() contentDescription("") } - classInstance("checkedIcon", OdsIconButtonIcon::class.java) { + classInstance("checkedIcon") { painter() contentDescription("") } diff --git a/app/src/main/java/com/orange/ods/app/ui/components/progress/ProgressLinear.kt b/app/src/main/java/com/orange/ods/app/ui/components/progress/ProgressLinear.kt index c4992342a..15f61505a 100644 --- a/app/src/main/java/com/orange/ods/app/ui/components/progress/ProgressLinear.kt +++ b/app/src/main/java/com/orange/ods/app/ui/components/progress/ProgressLinear.kt @@ -117,7 +117,7 @@ fun ProgressLinear() { if (type.value == ProgressCustomizationState.Type.Determinate) stringRepresentation("progress", determinateProgressValue) if (hasLabel) string("label", text) if (hasIcon) { - classInstance("icon", OdsLinearProgressIndicatorIcon::class.java) { + classInstance("icon") { painter() contentDescription("") }