@@ -264,7 +264,7 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
264
264
public fun <E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 > eventHandler (
265
265
name : () -> String = { "eventHandler" },
266
266
update : WorkflowAction <@UnsafeVariance PropsT , StateT , @UnsafeVariance OutputT >
267
- .Updater .(E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 ) -> Unit
267
+ .Updater .(E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 ) -> Unit
268
268
): (E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 ) -> Unit {
269
269
return { e1, e2, e3, e4, e5, e6, e7, e8, e9 ->
270
270
actionSink.send(action(name) { update(e1, e2, e3, e4, e5, e6, e7, e8, e9) })
@@ -274,7 +274,7 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
274
274
public fun <E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 , E10 > eventHandler (
275
275
name : () -> String = { "eventHandler" },
276
276
update : WorkflowAction <@UnsafeVariance PropsT , StateT , @UnsafeVariance OutputT >
277
- .Updater .(E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 , E10 ) -> Unit
277
+ .Updater .(E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 , E10 ) -> Unit
278
278
): (E1 , E2 , E3 , E4 , E5 , E6 , E7 , E8 , E9 , E10 ) -> Unit {
279
279
return { e1, e2, e3, e4, e5, e6, e7, e8, e9, e10 ->
280
280
actionSink.send(action(name) { update(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) })
@@ -287,30 +287,30 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
287
287
*/
288
288
public fun <PropsT , StateT , OutputT , ChildOutputT , ChildRenderingT >
289
289
BaseRenderContext <PropsT , StateT , OutputT >.renderChild (
290
- child : Workflow <Unit , ChildOutputT , ChildRenderingT >,
291
- key : String = "",
292
- handler : (ChildOutputT ) -> WorkflowAction <PropsT , StateT , OutputT >
293
- ): ChildRenderingT = renderChild(child, Unit , key, handler)
290
+ child : Workflow <Unit , ChildOutputT , ChildRenderingT >,
291
+ key : String = "",
292
+ handler : (ChildOutputT ) -> WorkflowAction <PropsT , StateT , OutputT >
293
+ ): ChildRenderingT = renderChild(child, Unit , key, handler)
294
294
295
295
/* *
296
296
* Convenience alias of [BaseRenderContext.renderChild] for workflows that don't emit output.
297
297
*/
298
298
public fun <PropsT , ChildPropsT , StateT , OutputT , ChildRenderingT >
299
299
BaseRenderContext <PropsT , StateT , OutputT >.renderChild (
300
- child : Workflow <ChildPropsT , Nothing , ChildRenderingT >,
301
- props : ChildPropsT ,
302
- key : String = ""
303
- ): ChildRenderingT = renderChild(child, props, key) { noAction() }
300
+ child : Workflow <ChildPropsT , Nothing , ChildRenderingT >,
301
+ props : ChildPropsT ,
302
+ key : String = ""
303
+ ): ChildRenderingT = renderChild(child, props, key) { noAction() }
304
304
305
305
/* *
306
306
* Convenience alias of [BaseRenderContext.renderChild] for children that don't take props or emit
307
307
* output.
308
308
*/
309
309
public fun <PropsT , StateT , OutputT , ChildRenderingT >
310
310
BaseRenderContext <PropsT , StateT , OutputT >.renderChild (
311
- child : Workflow <Unit , Nothing , ChildRenderingT >,
312
- key : String = ""
313
- ): ChildRenderingT = renderChild(child, Unit , key) { noAction() }
311
+ child : Workflow <Unit , Nothing , ChildRenderingT >,
312
+ key : String = ""
313
+ ): ChildRenderingT = renderChild(child, Unit , key) { noAction() }
314
314
315
315
/* *
316
316
* Ensures a [LifecycleWorker] is running. Since [worker] can't emit anything,
@@ -323,9 +323,9 @@ public fun <PropsT, StateT, OutputT, ChildRenderingT>
323
323
*/
324
324
public inline fun <reified W : LifecycleWorker , PropsT , StateT , OutputT >
325
325
BaseRenderContext <PropsT , StateT , OutputT >.runningWorker (
326
- worker : W ,
327
- key : String = ""
328
- ) {
326
+ worker : W ,
327
+ key : String = ""
328
+ ) {
329
329
runningWorker(worker, key) {
330
330
// The compiler thinks this code is unreachable, and it is correct. But we have to pass a lambda
331
331
// here so we might as well check at runtime as well.
@@ -348,9 +348,9 @@ public inline fun <reified W : LifecycleWorker, PropsT, StateT, OutputT>
348
348
)
349
349
public inline fun <reified W : Worker <Nothing >, PropsT , StateT , OutputT >
350
350
BaseRenderContext <PropsT , StateT , OutputT >.runningWorker (
351
- worker : W ,
352
- key : String = ""
353
- ) {
351
+ worker : W ,
352
+ key : String = ""
353
+ ) {
354
354
runningWorker(worker, key) {
355
355
// The compiler thinks this code is unreachable, and it is correct. But we have to pass a lambda
356
356
// here so we might as well check at runtime as well.
@@ -378,10 +378,10 @@ public inline fun <reified W : Worker<Nothing>, PropsT, StateT, OutputT>
378
378
*/
379
379
public inline fun <T , reified W : Worker <T >, PropsT , StateT , OutputT >
380
380
BaseRenderContext <PropsT , StateT , OutputT >.runningWorker (
381
- worker : W ,
382
- key : String = "",
383
- noinline handler : (T ) -> WorkflowAction <PropsT , StateT , OutputT >
384
- ) {
381
+ worker : W ,
382
+ key : String = "",
383
+ noinline handler : (T ) -> WorkflowAction <PropsT , StateT , OutputT >
384
+ ) {
385
385
runningWorker(worker, typeOf<W >(), key, handler)
386
386
}
387
387
@@ -396,11 +396,11 @@ public inline fun <T, reified W : Worker<T>, PropsT, StateT, OutputT>
396
396
@PublishedApi
397
397
internal fun <T , PropsT , StateT , OutputT >
398
398
BaseRenderContext <PropsT , StateT , OutputT >.runningWorker (
399
- worker : Worker <T >,
400
- workerType : KType ,
401
- key : String = "",
402
- handler : (T ) -> WorkflowAction <PropsT , StateT , OutputT >
403
- ) {
399
+ worker : Worker <T >,
400
+ workerType : KType ,
401
+ key : String = "",
402
+ handler : (T ) -> WorkflowAction <PropsT , StateT , OutputT >
403
+ ) {
404
404
val workerWorkflow = WorkerWorkflow <T >(workerType, key)
405
405
renderChild(workerWorkflow, props = worker, key = key, handler = handler)
406
406
}
0 commit comments