Skip to content

Commit

Permalink
[#530] Review: Remove useless distinctBy
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinea committed Aug 11, 2023
1 parent b0a6e01 commit a0fedfb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import com.orange.ods.compose.component.banner.OdsBannerButton
import com.orange.ods.compose.component.banner.OdsBannerImage
import com.orange.ods.compose.component.list.OdsListItem
import com.orange.ods.compose.component.list.OdsSwitchTrailing
import com.orange.ods.utilities.extension.ifNotNull
import com.orange.ods.compose.utilities.extension.ifNotNull

@OptIn(ExperimentalMaterialApi::class)
@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import com.orange.ods.compose.theme.OdsDisplaySurface
@Composable
fun ButtonsTextToggleButtonsRow(customizationState: ButtonCustomizationState) {
val textToggleButtons =
LocalRecipes.current.first().ingredients.distinctBy { it.food }.take(ButtonCustomizationState.MaxToggleCount).map { ingredient ->
LocalRecipes.current.first().ingredients.take(ButtonCustomizationState.MaxToggleCount).map { ingredient ->
OdsTextToggleButtonsRowItem(ingredient.food.name, customizationState.isEnabled)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.google.accompanist.drawablepainter.rememberDrawablePainter
import com.orange.ods.compose.component.banner.OdsBanner
import com.orange.ods.compose.component.banner.OdsBannerButton
import com.orange.ods.compose.component.banner.OdsBannerImage
import com.orange.ods.utilities.extension.ifNotNull
import com.orange.ods.compose.utilities.extension.ifNotNull
import com.orange.ods.xml.R
import com.orange.ods.xml.component.OdsAbstractComposeView
import com.orange.ods.xml.utilities.extension.getResourceIdOrNull
Expand Down

0 comments on commit a0fedfb

Please sign in to comment.