Commit 9833dc57 by sikang

bug fix

parent cbe6d3d8
...@@ -91,8 +91,10 @@ public class UserPresenter extends BasePresenter<UserApi> { ...@@ -91,8 +91,10 @@ public class UserPresenter extends BasePresenter<UserApi> {
public void accept(GatewayInfoBean gatewayInfoBean) throws Exception { public void accept(GatewayInfoBean gatewayInfoBean) throws Exception {
Gateway.setGatewayInfoBean(gatewayInfoBean); Gateway.setGatewayInfoBean(gatewayInfoBean);
getCustomerMsg(""); getCustomerMsg("");
view.onHttpSuccess("", null);
EventBus.getDefault().post(ActionEnum.GATEWAY_UPDATED); EventBus.getDefault().post(ActionEnum.GATEWAY_UPDATED);
if (view != null) {
view.onHttpSuccess("", null);
}
} }
}); });
} }
...@@ -619,7 +621,6 @@ public class UserPresenter extends BasePresenter<UserApi> { ...@@ -619,7 +621,6 @@ public class UserPresenter extends BasePresenter<UserApi> {
handleRequest(apiService.display(), new HttpObserver<DisplayBean>() { handleRequest(apiService.display(), new HttpObserver<DisplayBean>() {
@Override @Override
public void onStart() { public void onStart() {
view.onHttpStart(action, true);
} }
@Override @Override
...@@ -637,17 +638,17 @@ public class UserPresenter extends BasePresenter<UserApi> { ...@@ -637,17 +638,17 @@ public class UserPresenter extends BasePresenter<UserApi> {
} }
data.setUpdateTime(System.currentTimeMillis()); data.setUpdateTime(System.currentTimeMillis());
PreferencesManager.get().saveCustomerInfo(data); PreferencesManager.get().saveCustomerInfo(data);
view.onHttpSuccess(action, data);
} }
@Override @Override
public void onError(int code, String msg) { public void onError(int code, String msg) {
view.onHttpError(action, msg); if (view != null) {
view.onHttpError(action, msg);
}
} }
@Override @Override
public void onFinish() { public void onFinish() {
view.onHttpFinish(action);
} }
}); });
} }
......
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