These are chat archives for ReactiveX/RxJava

14th
Apr 2016
Dmitriy Zaitsev
@DmitriyZaitsev
Apr 14 2016 16:43

Hey guys! your advice is needed.

I’ve got a splash screen that should check if user authenticated and then open another screen.
Min splash duration must be 3 sec.
How can I sync my authObservable with timer without boolean flags?
If I get response quickly, I'll wait. If I get response late, I’ll open a screen immediately.

Dorus
@Dorus
Apr 14 2016 16:58
auth.zip(Observable.timer(3000))
That will yield 1 item from auth after min 3 seconds
@DmitriyZaitsev
Dmitriy Zaitsev
@DmitriyZaitsev
Apr 14 2016 21:06
@Dorus that’s it. thanks!