Skip to content

Conversation

AntonMishanin
Copy link

Create a viewModelStore for each screen
When you click on back button, viewModelStore of this screen cleans their viewModels
It's works for version 0.6.4

But now it doesn't work - your click on back button - viewModel cleared and right away viewModel is creating again.
If you delete content: RendererContent value when you create ComposeRenderImpl in AppActivity and will use defaultRendererContent - it works good
I think we have a problem with content: RendererContent implementation

ScreenTransition( transitionSpec = { if (transitionType == ScreenTransitionType.Replace) { scaleIn(initialScale = 2f) + fadeIn() with fadeOut() } else { val (initialOffset, targetOffset) = when (transitionType) { ScreenTransitionType.Pop -> ({ size: Int -> -size }) to ({ size: Int -> size }) else -> ({ size: Int -> size }) to ({ size: Int -> -size }) } slideInHorizontally(initialOffsetX = initialOffset) with slideOutHorizontally(targetOffsetX = targetOffset) } } )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant