I am relatively new to RX world. So, there are many operators which I don't understand. I have spent a few hours to figure out the solution for my problem.
Which is:
I have one 'cold' observable(observable I) which emits only one result. It is for loading some initial data before application could load other items to show
On the other side, I have another 'hot' observable(observable II) which is loading data with paging, therefore emitting many results.
I want observable II to wait for observable I. If at the moment the observable II is created, observable I has already finished, I want observable II to not load initial data again.
To visualise :
Case 1
Observable I [---------------------------------------------------]
Observable II .................[----------------------------------------
Here observabele II should wait for observable I and only continue to work after that.
Case 2
Observable I [--------]
Observable II ...............[----------------------------------------
Here observable II should only check that observable I is finished and continue working
In both cases, execution of observable I should not happen more than once.
Question:
How can I do this using RX combining operators?