So when I add
val state = remember {
MutableTransitionState(false)
}
state.targetState = true
AnimatedVisibility(
visibleState = state,
enter = slideInHorizontally(
animationSpec = tween(
durationMillis = 250,
delayMillis = animationDelay
),
initialOffsetX = {
screenWidthPx
}
)
) {
content()
}
the animation is being triggered all the time when I return to this screen from another (popBackStack/naivateUp) or during config changes.
How to animate it only once?