Let the preview provider use stable data. I do not get why the generated screenshot was always similar.

This commit is contained in:
Benoit Marty
2025-10-13 16:28:20 +02:00
committed by Benoit Marty
parent 93ae7941a4
commit 90cd52b5d5
4 changed files with 32 additions and 20 deletions

View File

@@ -9,6 +9,7 @@ package io.element.android.libraries.designsystem.components.media
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.toImmutableList
import kotlinx.collections.immutable.toPersistentList
object WaveFormSamples {
val allRangeWaveForm = List(100) { it.toFloat() / 100 }.toImmutableList()
@@ -23,4 +24,6 @@ object WaveFormSamples {
1.000f, 0.334f, 0.321f, 0.011f, 0.000f,
0.000f, 0.003f,
)
val longRealisticWaveForm = List(4) { realisticWaveForm }.flatten().toPersistentList()
}