mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix warnings.
This commit is contained in:
committed by
Benoit Marty
parent
b2b93317f1
commit
7ec5e0e173
+6
-4
@@ -33,13 +33,15 @@ import io.element.android.libraries.designsystem.preview.ElementPreview
|
|||||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||||
import io.element.android.libraries.designsystem.theme.components.Text
|
import io.element.android.libraries.designsystem.theme.components.Text
|
||||||
import io.element.android.libraries.theme.ElementTheme
|
import io.element.android.libraries.theme.ElementTheme
|
||||||
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
import kotlinx.collections.immutable.toPersistentList
|
||||||
|
|
||||||
@DayNightPreviews
|
@DayNightPreviews
|
||||||
@Composable
|
@Composable
|
||||||
internal fun IconsCompoundPreview() = ElementPreview {
|
internal fun IconsCompoundPreview() = ElementPreview {
|
||||||
IconsPreview(
|
IconsPreview(
|
||||||
title = "R.drawable.ic_compound_*",
|
title = "R.drawable.ic_compound_*",
|
||||||
iconsList = iconsCompound,
|
iconsList = iconsCompound.toPersistentList(),
|
||||||
iconNameTransform = { name ->
|
iconNameTransform = { name ->
|
||||||
name.removePrefix("ic_compound_")
|
name.removePrefix("ic_compound_")
|
||||||
.replace("_", " ")
|
.replace("_", " ")
|
||||||
@@ -51,7 +53,7 @@ internal fun IconsCompoundPreview() = ElementPreview {
|
|||||||
internal fun IconsSeptemberPreview() = ElementPreview {
|
internal fun IconsSeptemberPreview() = ElementPreview {
|
||||||
IconsPreview(
|
IconsPreview(
|
||||||
title = "R.drawable.ic_september_*",
|
title = "R.drawable.ic_september_*",
|
||||||
iconsList = iconsSeptember,
|
iconsList = iconsSeptember.toPersistentList(),
|
||||||
iconNameTransform = { name ->
|
iconNameTransform = { name ->
|
||||||
name.removePrefix("ic_september_")
|
name.removePrefix("ic_september_")
|
||||||
.replace("_", " ")
|
.replace("_", " ")
|
||||||
@@ -63,7 +65,7 @@ internal fun IconsSeptemberPreview() = ElementPreview {
|
|||||||
internal fun IconsOtherPreview() = ElementPreview {
|
internal fun IconsOtherPreview() = ElementPreview {
|
||||||
IconsPreview(
|
IconsPreview(
|
||||||
title = "R.drawable.ic_*",
|
title = "R.drawable.ic_*",
|
||||||
iconsList = iconsOther,
|
iconsList = iconsOther.toPersistentList(),
|
||||||
iconNameTransform = { name ->
|
iconNameTransform = { name ->
|
||||||
name.removePrefix("ic_")
|
name.removePrefix("ic_")
|
||||||
.replace("_", " ")
|
.replace("_", " ")
|
||||||
@@ -73,7 +75,7 @@ internal fun IconsOtherPreview() = ElementPreview {
|
|||||||
@Composable
|
@Composable
|
||||||
private fun IconsPreview(
|
private fun IconsPreview(
|
||||||
title: String,
|
title: String,
|
||||||
iconsList: List<Int>,
|
iconsList: ImmutableList<Int>,
|
||||||
iconNameTransform: (String) -> String,
|
iconNameTransform: (String) -> String,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) = ElementPreview {
|
) = ElementPreview {
|
||||||
|
|||||||
Reference in New Issue
Block a user