BMG
08/29/2019, 7:43 AMflatMapObservable
before Single's subscription and handle if-else flow in flatMapObservable
. This is to follow not breaking the chain philosophy and having a single subscription.
His argument was, anyways Single's subscription would end before calling Observable's Subscription. So, why bother to keep it in a single chain. As in, when the Observable inside Single's subscription gets susbcribed, it is indeed a single subscription. Is this okay?
For ex:
Single.fromCallable {
getUser().isVerified
}.subscribe ({
if(it) view.showVerified
else subscribeToUserObservable()
})