alexsullivan114
08/29/2018, 8:00 PMcombineLatest
but that emits as soon as any of the combined streams have a value? Right now it appears that combineLatest
will only emit once all of the streams have a value, and will then emit each time one of the streams is updated.blakelee
08/29/2018, 8:01 PMalexsullivan114
08/29/2018, 8:03 PMnull
values in a stream, you'd need to represent both values as an optional or something along those linesblakelee
08/29/2018, 8:06 PMalexsullivan114
08/29/2018, 8:06 PMalexsullivan114
08/29/2018, 8:06 PMOptional
typealexsullivan114
08/29/2018, 8:07 PMblakelee
08/29/2018, 8:07 PMalexsullivan114
08/29/2018, 8:08 PMblakelee
08/29/2018, 8:11 PMprivate fun s() {
Observable.combineLatest(
Observable.just(optional(1), optional(2)).startWith(Optional.None),
Observable.just(optional("a", optional("b"))).startWith(Optional.None),
BiFunction { ints: Optional<Int>, strings: Optional<String> ->
TODO()
}
)
Doesn’t seem to be any errors here. Just doesn’t look pretty. And there is also the useless 1st case where everything is Optional.None. Not sure you want a filter that is checking every time something is emittedalexsullivan114
08/29/2018, 8:13 PMblakelee
08/29/2018, 8:14 PMalexsullivan114
08/29/2018, 8:14 PMalexsullivan114
08/29/2018, 8:14 PMalexsullivan114
08/29/2018, 8:15 PMursus
08/29/2018, 8:40 PMursus
08/29/2018, 8:40 PMursus
08/29/2018, 8:40 PM