iOS like gesture navigation back UI glitch
When navigating back with ios style navigation gesture previous entry is rendered briefly because of exit animation in
https://github.com/Tlaster/PreCompose/assets/32630888/dca991ac-fe89-4c20-8dfc-142530568e69
/// do not mind jumping list it is some other issue with recomposition.
https://github.com/Tlaster/PreCompose/assets/32630888/d4d2cb7b-4b68-4455-bffd-b1c5ff860ecb
AnimatedContent(
backStackEntry,
transitionSpec = {
if (prevWasSwiped) {
EnterTransition.None togetherWith ExitTransition.None
} else {
transitionSpec()
}
},
modifier = Modifier.zIndex(
if (isPrev) {
0f
} else {
1f
},
),
) {
SwipeItem(
dismissState = dismissState,
swipeProperties = actualSwipeProperties,
isPrev = isPrev,
isLast = !canGoBack,
) {
NavHostContent(composeStateHolder, it)
}
}
//Sugestion
if (prevWasSwiped) {
SwipeItem(
dismissState = dismissState,
swipeProperties = actualSwipeProperties,
isPrev = isPrev,
isLast = !canGoBack,
) {
NavHostContent(composeStateHolder, backStackEntry)
}
} else {
AnimatedContent(
backStackEntry,
transitionSpec = {
transitionSpec()
},
modifier = Modifier.zIndex(
if (isPrev) {
0f
} else {
1f
},
),
) {
SwipeItem(
dismissState = dismissState,
swipeProperties = actualSwipeProperties,
isPrev = isPrev,
isLast = !canGoBack,
) {
NavHostContent(composeStateHolder, it)
}
}
}`
Seems like in compose 1.6.0 we're getting SeekableTransitionState which can control the progress of a transition, I think this is the perfect API to fix it, so I'd like to wait for Jetbrains to release a 1.6.0 version of compose multiplatform.
Is there any workaround?
compose multiplatform 1.6.0 beta is released, waiting for the fix