darkmoon_uk
12/10/2021, 12:52 AMAnimatedContent
transitions because multiple recompositions are firing where conceptually there should be only one.
Carefully tracing the code for state changes is a given, just wondering if people can share any smart breakpoints/profiling tricks they're employing?Doris Liu
12/10/2021, 1:17 AMAnimatedContent
looks like? Can you share the code?darkmoon_uk
12/10/2021, 1:35 AMdarkmoon_uk
12/10/2021, 1:37 AMtransitionTo
is my own infix function to determine what kind of transition should be used; either SlideLeft
or SlideRight
if the workflow state represents another 'screen', or None
if the new state represents a state change within the current 'screen'.Doris Liu
12/10/2021, 1:37 AMworkFlowState
directly?darkmoon_uk
12/10/2021, 1:38 AMwith(workflowState)
... and any such usages below that?Doris Liu
12/10/2021, 1:38 AMwith (it) ...
darkmoon_uk
12/10/2021, 1:39 AMdarkmoon_uk
12/10/2021, 1:41 AMdarkmoon_uk
12/10/2021, 1:42 AMdarkmoon_uk
12/10/2021, 1:44 AM@Composable
?Doris Liu
12/10/2021, 1:48 AMAnimatedContent
is transitioning in between, each is associated with a different target state. Each set of the content ideally should only reflect what's defined in their corresponding target state. That would require that the content read the state passed to the content lambda.
By reading an external state (i.e. workflowState), all the active content is observing that change, therefore causing unnecessary recompositiondarkmoon_uk
12/10/2021, 1:49 AMdarkmoon_uk
12/10/2021, 1:52 AM