konmik / nucleus

Nucleus is an Android library, which utilizes the Model-View-Presenter pattern to properly connect background tasks with visual parts of an application.
MIT License
1.98k stars 253 forks source link

add DeliverLatest #134

Open kanat opened 7 years ago

kanat commented 7 years ago

Hi.

DeliverLatest completes automatically when the source observable is done.

In my case I have a Repository which emits data from Cache, DB and API. I can emit from Cache first, then from DB and API. It's a sequence of distinct items.

Why I'm not using deliveryLatestCache?

Why I'm not using deliveryFirst?

Why I'm not using deliveryReplay?

konmik commented 7 years ago

hi, why not just use Observable.last() operator together with deliveryFirst?

konmik commented 7 years ago

Oh, I understood why. I need to think a little bit :)