iex02/13/2020, 7:26 AM
on the api observable(s) but this leads to a bit unwieldy chains in particular when there are several calls...
Daniel Rodak02/13/2020, 11:01 AM
library made by Jake Wharton which allows you to simply
Otherwise, if you don't want to add any external library you could write your own implementation of the
method which would based on the
. I'm not exactly sure how you should handle errors because it's based on the architecture that you are using. Personally, I'm using MVI and handling errors in the presenter/business layer. Personally, I think that handling call by
is quite correct. You can add mapper for certain type of errors and then it's only a single method call inside error handler. Also, wouldn't say that making a new subscribtion for each button press is a good practice.
ursus02/13/2020, 11:21 AM
iex02/14/2020, 11:56 AM
it means that you're creating a new subscription per click, since the observer chain is aborted.
to discard a possible ongoing request and cancelling the current subscription though.
Daniel Rodak02/14/2020, 12:30 PM
iex02/14/2020, 12:31 PM
doesn't do this afaik