ThirtyInch
ThirtyInch copied to clipboard
rx.Single support for RxTiPresenterUtils
Most of my data is returned as Singles instead of Observables, so having Single support built-in for RxTiPresenterUtils would be great.
I can of course work around this limitation by simply doing this:
categoryService.getMainCategories()
.toObservable()
.compose(RxTiPresenterUtils.deliverLatestToView(this))
.subscribe(categories -> ()));
Sounds useful. Although deliverLatestToView
doesn't make a lot of sense because it's only one event. deliverToView
should be enough.
Alternatively you could use the new sendToView()
method
categoryService.getMainCategories()
.subscribe(categories -> {
sendToView(view -> view.show(categories));
}));
Seems reasonable enough, slight oversight on my part not to notice the deliverToView method at all.