@@ -5,15 +5,14 @@ import com.squareup.sample.compose.databinding.LegacyViewBinding
55import com.squareup.sample.compose.nestedrenderings.RecursiveWorkflow.LegacyRendering
66import com.squareup.sample.compose.nestedrenderings.RecursiveWorkflow.Rendering
77import com.squareup.sample.compose.nestedrenderings.RecursiveWorkflow.State
8- import com.squareup.workflow1.SessionWorkflow
98import com.squareup.workflow1.Snapshot
9+ import com.squareup.workflow1.StatefulWorkflow
1010import com.squareup.workflow1.WorkflowExperimentalApi
1111import com.squareup.workflow1.action
1212import com.squareup.workflow1.renderChild
1313import com.squareup.workflow1.ui.AndroidScreen
1414import com.squareup.workflow1.ui.Screen
1515import com.squareup.workflow1.ui.ScreenViewFactory
16- import kotlinx.coroutines.CoroutineScope
1716import kotlinx.coroutines.delay
1817import kotlin.time.Duration
1918import kotlin.time.Duration.Companion.ZERO
@@ -28,14 +27,13 @@ import kotlin.time.Duration.Companion.seconds
2827 * through Composable renderings as well as adapting in both directions.
2928 */
3029@OptIn(WorkflowExperimentalApi ::class )
31- object RecursiveWorkflow : SessionWorkflow <Unit, State, Unit, Screen>() {
30+ object RecursiveWorkflow : StatefulWorkflow <Unit, State, Unit, Screen>() {
3231
3332 data class State (
3433 val children : Int = 0 ,
3534 val flashTrigger : Int = 0 ,
3635 val nextFlashId : Int = 0 ,
3736 val pendingFlashes : List <Int > = emptyList(),
38- val flashScope : CoroutineScope ,
3937 )
4038
4139 /* *
@@ -69,8 +67,7 @@ object RecursiveWorkflow : SessionWorkflow<Unit, State, Unit, Screen>() {
6967 override fun initialState (
7068 props : Unit ,
7169 snapshot : Snapshot ? ,
72- workflowScope : CoroutineScope
73- ): State = State (flashScope = workflowScope)
70+ ): State = State ()
7471
7572 override fun render (
7673 renderProps : Unit ,
0 commit comments