Paul Woitaschek
03/19/2018, 8:17 AMsuspend fun myObject : MyObject
.
I now want to listen to events of that repository. When I start listening, I want to subscribe to the flowable. If the Optional is present, I want to return the wrapped object. If it's absent, I want to load it and insert it into the database. If that fails, I want to inform the user about an error. If the object is present but stale, I want to try to load it from the API but not inform the user about the failure.
And all together I want to make sure that there are no unnecessary api calls so that listening to that repo from other places does not start another network call.