Commit 62848680 by sikang

bug fix gateway

parent 78b3d9b2
......@@ -62,13 +62,12 @@ public class UserPresenter extends BasePresenter<UserApi> {
.concatMap(new Function<String, ObservableSource<GatewayInfoBean>>() {
@Override
public ObservableSource<GatewayInfoBean> apply(String s) throws Exception {
return apiService.getGateway(s);
}
})
.onErrorReturn(new Function<Throwable, GatewayInfoBean>() {
@Override
public GatewayInfoBean apply(Throwable throwable) throws Exception {
return new GatewayInfoBean();
return apiService.getGateway(s).onErrorReturn(new Function<Throwable, GatewayInfoBean>() {
@Override
public GatewayInfoBean apply(Throwable throwable) throws Exception {
return new GatewayInfoBean();
}
});
}
})
.filter(new Predicate<GatewayInfoBean>() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment