Hey, I'm trying to write an extension method that uses .replay internally.
My problem is that if I don't follow .replay with autoConnect/refCount etc, and move on to other operators, then I lose the ConnectableObservable reference.
I would like to not include refCount as part of the method impl, and return ConnectableObservable to let consumers decide.
Is there a way to achieve this?
Copy code
fun <T> Observable<T>.foo(): ConnectableObservable<T> {
return someOperators...
.replay(1)
.someMoreOperators...
}