Matthew Laser
03/24/2022, 5:48 PMcombine
operator, but it’s not getting me quite the result I’m after.
Here’s an example of what I’ve got now
flowOne()
.combine(flowTwo, { a, b -> Pair(a,b) })
.onEach { ... }
While the actual values of the Pair
i’m creating are correct, as far as I can tell, the values are only updated when flowOne
emits a value, only then combining with the latest value from flowTwo
. Is there an elegant operator (or approach) I can use to propagate my Pair
immediately when either flowOne
or flowTwo
update, not just flowOne
?
update: turns out I combine
is what I want! except, rather than flowOne.combine(flowTwo)
, I need combine(flowOne, flowTwo)
:)zip
in the past with Rx
but I think that’s also probably not what I’m looking forMichael Marshall
03/25/2022, 2:32 AMcombine(flow1, flow2)
is the same as flow1.combine(flow2)
Looking at the docs and implementation it seems to match up with my assumption, but I could be wrong.