feat: spring instead of tween for mockup

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2024-04-03 14:54:53 +02:00
parent a1ba1ca48c
commit e2dc704685
1 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,7 @@
package chat.revolt.screens.labs.ui.mockups package chat.revolt.screens.labs.ui.mockups
import androidx.compose.animation.animateColorAsState import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.EaseInOutExpo import androidx.compose.animation.core.spring
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsPressedAsState import androidx.compose.foundation.interaction.collectIsPressedAsState
@ -64,7 +63,7 @@ fun CallScreenMockup() {
} else { } else {
MaterialTheme.colorScheme.secondaryContainer MaterialTheme.colorScheme.secondaryContainer
}, },
animationSpec = tween(200, easing = EaseInOutExpo), animationSpec = spring(),
label = "pttBackground" label = "pttBackground"
) )
val pttText by animateColorAsState( val pttText by animateColorAsState(
@ -73,7 +72,7 @@ fun CallScreenMockup() {
} else { } else {
MaterialTheme.colorScheme.onSecondaryContainer MaterialTheme.colorScheme.onSecondaryContainer
}, },
animationSpec = tween(200, easing = EaseInOutExpo), animationSpec = spring(),
label = "pttText" label = "pttText"
) )