Closed thomasnield closed 8 years ago
The use of initialCapacity
might be broken too as the caching happens to each independent subscription. Client might as well cache it themselves with that behavior. But the desired behavior is to have caching happen for all subscribers.
For RxKotlinFX, perhaps an Observable#addTo(CompositeObservable)
extension function would be helpful as well to keep it fluent.
I think I got it. A compose()
lambda should be passed as an optional argument to do any manipulations to the aggregated Observable
.
CompositeObservable<Int> selectedId =
new CompositeObservable<>(obs -> obs.cache(1).publish().refCount());
This will take care of caching, publishing, and any other options you would like to do to the aggregated Observable
returned from toObservable()
.
Released in RxJavaFX 0.2.0. I think this is a wrap.
I won't make these changes right now. Just documenting them.
* Add varargadd()
andremove()
methods* Addclear()
method to remove all Observables* Back withObservableSet
instead ofObservableList
to prevent duplicates* AddgetBackingList()
to return unmodifiableObservableList<Observable<T>>
for currently tracked Observables.