Christoph Wiesner
10/12/2022, 6:52 AMcombine
operator only emits once every flow has an emission.
in my case i want to combine flows and it might that one flow would not emit at all - in that case i want to have the transformation receive a null value for not yet existing values of those streams.
combineAlways(flow1, flow2) { v1, v2 (null as not yet an emission) ->
...
}
is there a way to achieve that?Trym Nilsen
10/12/2022, 6:54 AMChristoph Wiesner
10/12/2022, 7:06 AMTrym Nilsen
10/12/2022, 7:12 AMChristoph Wiesner
10/12/2022, 7:12 AMefemoney
10/12/2022, 7:21 AMflow2.onStart { emit(null) }
?efemoney
10/12/2022, 7:23 AMcombine(
flow1,
flow2.onStart { emit(null) },
) { o1, o2? ->
// ... do your thing
}
Christoph Wiesner
10/12/2022, 7:27 AMefemoney
10/12/2022, 7:39 AMChristoph Wiesner
10/12/2022, 7:41 AMChristoph Wiesner
10/12/2022, 7:42 AM