Commit 62848680 by sikang

bug fix gateway

parent 78b3d9b2
...@@ -62,14 +62,13 @@ public class UserPresenter extends BasePresenter<UserApi> { ...@@ -62,14 +62,13 @@ public class UserPresenter extends BasePresenter<UserApi> {
.concatMap(new Function<String, ObservableSource<GatewayInfoBean>>() { .concatMap(new Function<String, ObservableSource<GatewayInfoBean>>() {
@Override @Override
public ObservableSource<GatewayInfoBean> apply(String s) throws Exception { public ObservableSource<GatewayInfoBean> apply(String s) throws Exception {
return apiService.getGateway(s); return apiService.getGateway(s).onErrorReturn(new Function<Throwable, GatewayInfoBean>() {
}
})
.onErrorReturn(new Function<Throwable, GatewayInfoBean>() {
@Override @Override
public GatewayInfoBean apply(Throwable throwable) throws Exception { public GatewayInfoBean apply(Throwable throwable) throws Exception {
return new GatewayInfoBean(); return new GatewayInfoBean();
} }
});
}
}) })
.filter(new Predicate<GatewayInfoBean>() { .filter(new Predicate<GatewayInfoBean>() {
@Override @Override
......
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