Skip to content

Commit bd97cca

Browse files
committed
Merge branch 'develop' of https://github.com/vector-im/element-x-android into dla/feature/room_list_decoration
2 parents f465231 + 739c1d9 commit bd97cca

File tree

1 file changed

+0
-30
lines changed
  • features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components

1 file changed

+0
-30
lines changed

features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,13 @@ import androidx.compose.runtime.Composable
3434
import androidx.compose.runtime.remember
3535
import androidx.compose.ui.Alignment
3636
import androidx.compose.ui.Modifier
37-
import androidx.compose.ui.geometry.Rect
38-
import androidx.compose.ui.geometry.Size
39-
import androidx.compose.ui.graphics.Outline
40-
import androidx.compose.ui.graphics.Path
41-
import androidx.compose.ui.graphics.Shape
4237
import androidx.compose.ui.graphics.vector.ImageVector
4338
import androidx.compose.ui.res.stringResource
4439
import androidx.compose.ui.res.vectorResource
4540
import androidx.compose.ui.text.AnnotatedString
4641
import androidx.compose.ui.text.style.TextOverflow
4742
import androidx.compose.ui.tooling.preview.Preview
4843
import androidx.compose.ui.tooling.preview.PreviewParameter
49-
import androidx.compose.ui.unit.Density
50-
import androidx.compose.ui.unit.LayoutDirection
5144
import androidx.compose.ui.unit.dp
5245
import io.element.android.features.roomlist.impl.model.RoomListRoomSummary
5346
import io.element.android.features.roomlist.impl.model.RoomListRoomSummaryProvider
@@ -211,29 +204,6 @@ private fun NotificationIcon(room: RoomListRoomSummary) {
211204
}
212205
}
213206

214-
val TextPlaceholderShape = PercentRectangleSizeShape(0.5f)
215-
216-
class PercentRectangleSizeShape(private val percent: Float) : Shape {
217-
override fun createOutline(
218-
size: Size,
219-
layoutDirection: LayoutDirection,
220-
density: Density
221-
): Outline {
222-
val halfPercent = percent / 2f
223-
val path = Path().apply {
224-
val rect = Rect(
225-
left = 0f,
226-
top = size.height * halfPercent,
227-
right = size.width,
228-
bottom = size.height * (1 - halfPercent)
229-
)
230-
addRect(rect)
231-
close()
232-
}
233-
return Outline.Generic(path)
234-
}
235-
}
236-
237207
@Preview
238208
@Composable
239209
internal fun RoomSummaryRowLightPreview(@PreviewParameter(RoomListRoomSummaryProvider::class) data: RoomListRoomSummary) =

0 commit comments

Comments
 (0)