Repository: thunderbird/thunderbird-android
File: core/ui/compose/designsystem/src/main/kotlin/net/thunderbird/core/ui/compose/designsystem/organism/message/MessageItem.kt (Kotlin)

Code before:
 * @param onClick A callback function to be invoked when the message item is clicked.
 * @param onLongClick A lambda function to be invoked when the message item is long-clicked.
 * @param onLeadingClick A callback function to be invoked when the leading content is clicked.
 * @param colors The colors to be used for the message item. See [MessageItemDefaults].
 * @param modifier The modifier to be applied to the message item.
 * @param hasAttachments A boolean indicating whether the message has attachments.
 *  Defaults to `false`.
 * @param selected A boolean indicating whether the message item is selected.
 *  Defaults to `false`.
 * @param maxPreviewLines The maximum number of lines to display for the message preview.
 *  Defaults to `2`.
 * @param contentPadding The padding to be applied to the content of the message item.
 *  Defaults to [MessageItemDefaults.defaultContentPadding].
 * @see MessageItemDefaults
 */
@Suppress("LongParameterList", "LongMethod")
@Composable
internal fun MessageItem(
    leading: @Composable () -> Unit,
    sender: @Composable () -> Unit,
    subject: @Composable () -> Unit,
    preview: CharSequence,
    action: @Composable () -> Unit,
    receivedAt: LocalDateTime,
    showAccountIndicator: Boolean,
    accountIndicatorColor: Int?,
    onClick: () -> Unit,
    onLongClick: () -> Unit,
    onLeadingClick: () -> Unit,
    modifier: Modifier = Modifier,
    colors: MessageItemColors = MessageItemDefaults.readMessageItemColors(),
    hasAttachments: Boolean = false,
    selected: Boolean = false,
    maxPreviewLines: Int = 2,
    contentPadding: PaddingValues = MessageItemDefaults.defaultContentPadding,
) {
    val outlineVariant = MainTheme.colors.outlineVariant
    var contentStart by remember { mutableFloatStateOf(0f) }
    val layoutDirection = LocalLayoutDirection.current
    Surface(
        modifier = modifier
            .combinedClickable(
                onClick = onClick,
                onLongClick = onLongClick,
            )
            .drawWithCache {
                onDrawWithContent {
                    drawContent()
                    val x = contentStart + contentPadding.calculateStartPadding(layoutDirection).toPx()
                    drawOutline(
                        outline = Outline.Rectangle(

Review comment (suggestion):
Please, use `Color` instead.

```suggestion
    accountIndicatorColor: Color?,
```

Code after:
 * @param accountIndicatorColor The color of the account indicator, if shown.
 * @param onClick A callback function to be invoked when the message item is clicked.
 * @param onLongClick A lambda function to be invoked when the message item is long-clicked.
 * @param onLeadingClick A callback function to be invoked when the leading content is clicked.
 * @param colors The colors to be used for the message item. See [MessageItemDefaults].
 * @param modifier The modifier to be applied to the message item.
 * @param hasAttachments A boolean indicating whether the message has attachments.
 *  Defaults to `false`.
 * @param selected A boolean indicating whether the message item is selected.
 *  Defaults to `false`.
 * @param maxPreviewLines The maximum number of lines to display for the message preview.
 *  Defaults to `2`.
 * @param contentPadding The padding to be applied to the content of the message item.
 *  Defaults to [MessageItemDefaults.defaultContentPadding].
 * @see MessageItemDefaults
 */
@Suppress("LongParameterList")
@Composable
internal fun MessageItem(
    leading: @Composable () -> Unit,
    sender: @Composable () -> Unit,
    subject: @Composable () -> Unit,
    preview: CharSequence,
    action: @Composable () -> Unit,
    receivedAt: LocalDateTime,
    showAccountIndicator: Boolean,
    accountIndicatorColor: Color?,
    onClick: () -> Unit,
    onLongClick: () -> Unit,
    onLeadingClick: () -> Unit,
    modifier: Modifier = Modifier,
    colors: MessageItemColors = MessageItemDefaults.readMessageItemColors(),
    hasAttachments: Boolean = false,
    selected: Boolean = false,
    maxPreviewLines: Int = 2,
    contentPadding: PaddingValues = MessageItemDefaults.defaultContentPadding,
) {
    val outlineVariant = MainTheme.colors.outlineVariant
    var contentStart by remember { mutableFloatStateOf(0f) }
    val layoutDirection = LocalLayoutDirection.current
    Surface(
        modifier = modifier
            .combinedClickable(
                onClick = onClick,
                onLongClick = onLongClick,
            )
            .drawWithCache {
                onDrawWithContent {
                    drawContent()
                    val x = contentStart + contentPadding.calculateStartPadding(layoutDirection).toPx()
                    drawOutline(