From 45174030389f450c2a2b4653fa1934d8e4c896ee Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 13 Jun 2025 18:35:47 +0200 Subject: [PATCH] change (room avatar) : use TextAvatar from TombstonedRoomAvatar --- .../components/avatar/TombstonedRoomAvatar.kt | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/TombstonedRoomAvatar.kt diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/TombstonedRoomAvatar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/TombstonedRoomAvatar.kt new file mode 100644 index 0000000000..9b33e7f1ed --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/TombstonedRoomAvatar.kt @@ -0,0 +1,36 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +package io.element.android.libraries.designsystem.components.avatar + +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import io.element.android.compound.theme.AvatarColors +import io.element.android.compound.theme.ElementTheme + +@Composable +fun TombstonedRoomAvatar( + size: AvatarSize, + modifier: Modifier = Modifier, + contentDescription: String? = null, +) { + TextAvatar( + text = "!", + size = size.dp, + colors = AvatarColors( + background = ElementTheme.colors.bgSubtlePrimary, + foreground = ElementTheme.colors.iconTertiary + ), + modifier = modifier + .size(size.dp) + .clip(CircleShape), + contentDescription = contentDescription + ) +}