@@ -162,9 +162,11 @@ private class BackStackWorkflowScopeImpl<PropsT, OutputT, R>(
162162 override suspend fun goBack (): Nothing {
163163 // If parent is null, goBack will not be exposed and will never be called.
164164 val parent = checkNotNull(parentFrame) { " goBack called on root scope" }
165- actionSink.send(action(" popTo" ) {
166- state = state.popToFrame(parent)
167- })
165+ actionSink.send(
166+ action(" popTo" ) {
167+ state = state.popToFrame(parent)
168+ }
169+ )
168170 thisFrame.cancelSelf()
169171 }
170172}
@@ -205,9 +207,11 @@ private class BackStackScreenScopeImpl<PropsT, OutputT, R>(
205207 override fun goBack () {
206208 // If parent is null, goBack will not be exposed and will never be called.
207209 val parent = checkNotNull(parentFrame) { " goBack called on root scope" }
208- actionSink.send(action(" popTo" ) {
209- state = state.popToFrame(parent)
210- })
210+ actionSink.send(
211+ action(" popTo" ) {
212+ state = state.popToFrame(parent)
213+ }
214+ )
211215 thisFrame.cancel()
212216 }
213217}
@@ -407,9 +411,11 @@ private suspend fun <PropsT, OutputT, ChildPropsT, ChildOutputT, R> showWorkflow
407411 } else {
408412 // Ensure the frame has actually been added to the stack.
409413 readyForPropUpdates.join()
410- actionSink.send(action(" setProps" ) {
411- state = state.setFrameProps(frame, newProps)
412- })
414+ actionSink.send(
415+ action(" setProps" ) {
416+ state = state.setFrameProps(frame, newProps)
417+ }
418+ )
413419 }
414420 }
415421 }
@@ -424,9 +430,11 @@ private suspend fun <PropsT, OutputT, ChildPropsT, ChildOutputT, R> showWorkflow
424430 )
425431
426432 // Tell the workflow runtime to start rendering the new workflow.
427- actionSink.send(action(" showWorkflow" ) {
428- state = state.appendFrame(frame)
429- })
433+ actionSink.send(
434+ action(" showWorkflow" ) {
435+ state = state.appendFrame(frame)
436+ }
437+ )
430438 // Allow the props collector to send more prop update actions. Even though the initial action
431439 // hasn't run yet, any future actions will be enqueued after it, so it's safe.
432440 readyForPropUpdates.complete()
@@ -435,9 +443,11 @@ private suspend fun <PropsT, OutputT, ChildPropsT, ChildOutputT, R> showWorkflow
435443 frame.awaitResult()
436444 } finally {
437445 frameScope.cancel()
438- actionSink.send(action(" unshowWorkflow" ) {
439- state = state.removeFrame(frame)
440- })
446+ actionSink.send(
447+ action(" unshowWorkflow" ) {
448+ state = state.removeFrame(frame)
449+ }
450+ )
441451 }
442452}
443453
@@ -459,17 +469,21 @@ private suspend fun <OutputT, R> showScreenImpl(
459469 frame.initScreen(screenFactory)
460470
461471 // Tell the workflow runtime to start rendering the new workflow.
462- actionSink.send(action(" showScreen" ) {
463- state = state.appendFrame(frame)
464- })
472+ actionSink.send(
473+ action(" showScreen" ) {
474+ state = state.appendFrame(frame)
475+ }
476+ )
465477
466478 return try {
467479 frame.awaitResult()
468480 } finally {
469481 frameScope.cancel()
470- actionSink.send(action(" unshowScreen" ) {
471- state = state.removeFrame(frame)
472- })
482+ actionSink.send(
483+ action(" unshowScreen" ) {
484+ state = state.removeFrame(frame)
485+ }
486+ )
473487 }
474488}
475489
0 commit comments