fix: Do not show animation from WelcomeScreen to AudioRecorderScreen

This commit is contained in:
Myzel394 2023-08-06 12:41:22 +02:00
parent c8fb20452f
commit 577e6e0aab
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B

View File

@ -1,5 +1,6 @@
package app.myzel394.locationtest.ui
import androidx.compose.animation.Crossfade
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.scaleIn
@ -44,7 +45,10 @@ fun Navigation() {
composable(
Screen.AudioRecorder.route,
enterTransition = {
scaleIn(initialScale = SCALE_IN) + fadeIn()
when (initialState.destination.route) {
Screen.Welcome.route -> null
else -> scaleIn(initialScale = SCALE_IN) + fadeIn()
}
},
exitTransition = {
scaleOut(targetScale = SCALE_IN) + fadeOut()