From 1dd874d8359fb87585751b5a7810f7f4e71de221 Mon Sep 17 00:00:00 2001 From: Marco Romano Date: Mon, 18 Sep 2023 14:42:42 +0200 Subject: [PATCH] Remove dead code in room summary row Not sure why it's unused but it's almost 1 year old so probably safe to remove. --- .../impl/components/RoomSummaryRow.kt | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt index aab174c6a4..a6982f8201 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt @@ -33,17 +33,10 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.geometry.Rect -import androidx.compose.ui.geometry.Size -import androidx.compose.ui.graphics.Outline -import androidx.compose.ui.graphics.Path -import androidx.compose.ui.graphics.Shape import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter -import androidx.compose.ui.unit.Density -import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import io.element.android.features.roomlist.impl.model.RoomListRoomSummary import io.element.android.features.roomlist.impl.model.RoomListRoomSummaryProvider @@ -175,29 +168,6 @@ private fun RowScope.LastMessageAndIndicatorRow(room: RoomListRoomSummary) { ) } -val TextPlaceholderShape = PercentRectangleSizeShape(0.5f) - -class PercentRectangleSizeShape(private val percent: Float) : Shape { - override fun createOutline( - size: Size, - layoutDirection: LayoutDirection, - density: Density - ): Outline { - val halfPercent = percent / 2f - val path = Path().apply { - val rect = Rect( - left = 0f, - top = size.height * halfPercent, - right = size.width, - bottom = size.height * (1 - halfPercent) - ) - addRect(rect) - close() - } - return Outline.Generic(path) - } -} - @Preview @Composable internal fun RoomSummaryRowLightPreview(@PreviewParameter(RoomListRoomSummaryProvider::class) data: RoomListRoomSummary) =