mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-07 11:00:22 +00:00
Remove useless derivedStateOf
This commit is contained in:
+1
-6
@@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
@@ -51,14 +50,10 @@ fun LiveWaveformView(
|
||||
linePadding: Dp = 2.dp,
|
||||
) {
|
||||
var canvasSize by remember { mutableStateOf(DpSize(0.dp, 0.dp)) }
|
||||
|
||||
var parentWidth by remember { mutableIntStateOf(0) }
|
||||
|
||||
val waveformWidth by remember(levels.size, lineWidth, linePadding) {
|
||||
derivedStateOf {
|
||||
val waveformWidth = remember(levels.size, lineWidth, linePadding) {
|
||||
levels.size * (lineWidth.value + linePadding.value)
|
||||
}
|
||||
}
|
||||
|
||||
Box(
|
||||
contentAlignment = Alignment.CenterEnd,
|
||||
|
||||
Reference in New Issue
Block a user