RxJava — Practical takeUntil Example
Niklas Baudy

Nice use case, although you can make it even shorter if I’m right, by using `firstOrDefault()` with predicate. It will take the first one for which predicate evaluates to `true` or use the provided default value if observable is complete without any emitted item satisfying the predicate.

This way `takeUntil()` and `lastOrDefault()` become one `firstOrDefault()` call.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.