@@ -35,7 +35,7 @@ fun StoryScene(storyState: StoryState, modifier: Modifier = Modifier) {
3535 ) { scene ->
3636 holder.SaveableStateProvider (scene) {
3737 Box (Modifier .fillMaxSize()) {
38- SceneContent (storyState, scene, frame, this @AnimatedContent, this @SceneWrapper )
38+ SceneContent (storyState, scene, frame)
3939 }
4040 }
4141 }
@@ -44,12 +44,11 @@ fun StoryScene(storyState: StoryState, modifier: Modifier = Modifier) {
4444}
4545
4646@Composable
47+ context(_: AnimatedVisibilityScope , _: SharedTransitionScope )
4748private fun <T > SceneContent (
4849 storyState : StoryState ,
4950 stateScene : StoryState .StateScene <T >,
5051 frame : Transition <StoryState .StateFrame <* >>,
51- animatedContentScope : AnimatedContentScope ,
52- sharedTransitionScope : SharedTransitionScope ,
5352) {
5453 val state = frame.createChildTransition {
5554 @Suppress(" UNCHECKED_CAST" )
@@ -60,13 +59,11 @@ private fun <T> SceneContent(
6059 }
6160 }
6261
63- val scope = remember(storyState, stateScene, state, animatedContentScope, sharedTransitionScope ) {
62+ val scope = remember(storyState, stateScene, state) {
6463 StoryboardSceneScope (
6564 storyState = storyState,
6665 states = stateScene.scene.states,
6766 frame = state,
68- animatedVisibilityScope = animatedContentScope,
69- sharedTransitionScope = sharedTransitionScope
7067 )
7168 }
7269
@@ -79,7 +76,7 @@ internal fun SceneWrapper(
7976 decorator : SceneDecorator ,
8077 displayType : DisplayType ,
8178 modifier : Modifier = Modifier ,
82- content : @Composable SharedTransitionScope . () -> Unit ,
79+ content : @Composable context( SharedTransitionScope ) () -> Unit ,
8380) {
8481 FixedSize (size = size, modifier = modifier, contentAlignment = Alignment .Center ) {
8582 CompositionLocalProvider (LocalDisplayType provides displayType) {
0 commit comments