I have stream that emits items since an element. I know which element is. Once that element is emmited the stream doesn't emit more. The problem is that it doesn't emmit the onComplete. I need something more less like takeWhile
but emmiting the last element too. This is the idea with marbles:
(Original image extracted from ReactiveX TakeWhile)
Which operator or operators can I use to do this?
Just repeating my comment:
The operator is called takeUntil
with a Func1<T, Boolean>
predicate parameter:
http://reactivex.io/RxJava/javadoc/rx/Observable.html#takeUntil(rx.functions.Func1)