Skip to content

Commit

Permalink
Review: Remove useless extension method on Color
Browse files Browse the repository at this point in the history
  • Loading branch information
florentmaitre committed Dec 4, 2024
1 parent 7f49984 commit 0365743
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.graphics.vector.ImageVector
import com.orange.ouds.core.extensions.enabled

@Composable
internal fun OudsIcon(
Expand All @@ -29,11 +28,10 @@ internal fun OudsIcon(
tint: Color = OudsIconDefaults.tint,
enabled: Boolean = true,
) {
val iconTint = tint.enabled(enabled = enabled)
when (graphicsObject) {
is Painter -> Icon(painter = graphicsObject, contentDescription = contentDescription, modifier = modifier, tint = iconTint)
is ImageVector -> Icon(imageVector = graphicsObject, contentDescription = contentDescription, modifier = modifier, tint = iconTint)
is ImageBitmap -> Icon(bitmap = graphicsObject, contentDescription = contentDescription, modifier = modifier, tint = iconTint)
is Painter -> Icon(painter = graphicsObject, contentDescription = contentDescription, modifier = modifier, tint = tint)
is ImageVector -> Icon(imageVector = graphicsObject, contentDescription = contentDescription, modifier = modifier, tint = tint)
is ImageBitmap -> Icon(bitmap = graphicsObject, contentDescription = contentDescription, modifier = modifier, tint = tint)
else -> {}
}
}
19 changes: 0 additions & 19 deletions core/src/main/java/com/orange/ouds/core/extensions/ColorExt.kt

This file was deleted.

0 comments on commit 0365743

Please sign in to comment.