@@ -303,7 +303,7 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
303
303
public fun <E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 > eventHandler (
304
304
name : () -> String = { "eventHandler" },
305
305
update : WorkflowAction <@UnsafeVariance PropsT , StateT , @UnsafeVariance OutputT >
306
- .Updater .(E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 ) -> Unit
306
+ .Updater .(E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 ) -> Unit
307
307
): (E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 ) -> Unit {
308
308
return { e1, e2, e3, e4, e5, e6, e7, e8, e9 ->
309
309
actionSink.send(action(name) { update(e1, e2, e3, e4, e5, e6, e7, e8, e9) })
@@ -313,7 +313,7 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
313
313
public fun <E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 , E10 > eventHandler (
314
314
name : () -> String = { "eventHandler" },
315
315
update : WorkflowAction <@UnsafeVariance PropsT , StateT , @UnsafeVariance OutputT >
316
- .Updater .(E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 , E10 ) -> Unit
316
+ .Updater .(E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 , E10 ) -> Unit
317
317
): (E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 , E10 ) -> Unit {
318
318
return { e1, e2, e3, e4, e5, e6, e7, e8, e9, e10 ->
319
319
actionSink.send(action(name) { update(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) })
@@ -326,30 +326,30 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
326
326
*/
327
327
public fun <PropsT , StateT , OutputT , ChildOutputT , ChildRenderingT >
328
328
BaseRenderContext <PropsT , StateT , OutputT >.renderChild (
329
- child : Workflow <Unit , ChildOutputT , ChildRenderingT >,
330
- key : String = "",
331
- handler : (ChildOutputT ) -> WorkflowAction <PropsT , StateT , OutputT >
332
- ): ChildRenderingT = renderChild(child, Unit , key, handler)
329
+ child : Workflow <Unit , ChildOutputT , ChildRenderingT >,
330
+ key : String = "",
331
+ handler : (ChildOutputT ) -> WorkflowAction <PropsT , StateT , OutputT >
332
+ ): ChildRenderingT = renderChild(child, Unit , key, handler)
333
333
334
334
/* *
335
335
* Convenience alias of [BaseRenderContext.renderChild] for workflows that don't emit output.
336
336
*/
337
337
public fun <PropsT , ChildPropsT , StateT , OutputT , ChildRenderingT >
338
338
BaseRenderContext <PropsT , StateT , OutputT >.renderChild (
339
- child : Workflow <ChildPropsT , Nothing , ChildRenderingT >,
340
- props : ChildPropsT ,
341
- key : String = ""
342
- ): ChildRenderingT = renderChild(child, props, key) { noAction() }
339
+ child : Workflow <ChildPropsT , Nothing , ChildRenderingT >,
340
+ props : ChildPropsT ,
341
+ key : String = ""
342
+ ): ChildRenderingT = renderChild(child, props, key) { noAction() }
343
343
344
344
/* *
345
345
* Convenience alias of [BaseRenderContext.renderChild] for children that don't take props or emit
346
346
* output.
347
347
*/
348
348
public fun <PropsT , StateT , OutputT , ChildRenderingT >
349
349
BaseRenderContext <PropsT , StateT , OutputT >.renderChild (
350
- child : Workflow <Unit , Nothing , ChildRenderingT >,
351
- key : String = ""
352
- ): ChildRenderingT = renderChild(child, Unit , key) { noAction() }
350
+ child : Workflow <Unit , Nothing , ChildRenderingT >,
351
+ key : String = ""
352
+ ): ChildRenderingT = renderChild(child, Unit , key) { noAction() }
353
353
354
354
/* *
355
355
* Ensures a [LifecycleWorker] is running. Since [worker] can't emit anything,
@@ -362,9 +362,9 @@ public fun <PropsT, StateT, OutputT, ChildRenderingT>
362
362
*/
363
363
public inline fun <reified W : LifecycleWorker , PropsT , StateT , OutputT >
364
364
BaseRenderContext <PropsT , StateT , OutputT >.runningWorker (
365
- worker : W ,
366
- key : String = ""
367
- ) {
365
+ worker : W ,
366
+ key : String = ""
367
+ ) {
368
368
runningWorker(worker, key) {
369
369
// The compiler thinks this code is unreachable, and it is correct. But we have to pass a lambda
370
370
// here so we might as well check at runtime as well.
@@ -387,9 +387,9 @@ public inline fun <reified W : LifecycleWorker, PropsT, StateT, OutputT>
387
387
)
388
388
public inline fun <reified W : Worker <Nothing >, PropsT , StateT , OutputT >
389
389
BaseRenderContext <PropsT , StateT , OutputT >.runningWorker (
390
- worker : W ,
391
- key : String = ""
392
- ) {
390
+ worker : W ,
391
+ key : String = ""
392
+ ) {
393
393
runningWorker(worker, key) {
394
394
// The compiler thinks this code is unreachable, and it is correct. But we have to pass a lambda
395
395
// here so we might as well check at runtime as well.
@@ -417,10 +417,10 @@ public inline fun <reified W : Worker<Nothing>, PropsT, StateT, OutputT>
417
417
*/
418
418
public inline fun <T , reified W : Worker <T >, PropsT , StateT , OutputT >
419
419
BaseRenderContext <PropsT , StateT , OutputT >.runningWorker (
420
- worker : W ,
421
- key : String = "",
422
- noinline handler : (T ) -> WorkflowAction <PropsT , StateT , OutputT >
423
- ) {
420
+ worker : W ,
421
+ key : String = "",
422
+ noinline handler : (T ) -> WorkflowAction <PropsT , StateT , OutputT >
423
+ ) {
424
424
runningWorker(worker, typeOf<W >(), key, handler)
425
425
}
426
426
@@ -435,11 +435,11 @@ public inline fun <T, reified W : Worker<T>, PropsT, StateT, OutputT>
435
435
@PublishedApi
436
436
internal fun <T , PropsT , StateT , OutputT >
437
437
BaseRenderContext <PropsT , StateT , OutputT >.runningWorker (
438
- worker : Worker <T >,
439
- workerType : KType ,
440
- key : String = "",
441
- handler : (T ) -> WorkflowAction <PropsT , StateT , OutputT >
442
- ) {
438
+ worker : Worker <T >,
439
+ workerType : KType ,
440
+ key : String = "",
441
+ handler : (T ) -> WorkflowAction <PropsT , StateT , OutputT >
442
+ ) {
443
443
val workerWorkflow = WorkerWorkflow <T >(workerType, key)
444
444
renderChild(workerWorkflow, props = worker, key = key, handler = handler)
445
445
}
0 commit comments