Commit a4b1e70e by sikang

bug fix

parent ccb29f83
......@@ -120,6 +120,28 @@ public class UserPresenter extends BasePresenter<UserApi> {
@Override
public void onSuccess(GatewayInfoBean gatewayInfoBean) {
Gateway.setGatewayInfoBean(gatewayInfoBean);
submitDeviceInfo();
getCustomerMsg(action);
}
@Override
public void onError(int code, String msg) {
view.onHttpError(action, msg);
}
@Override
public void onFinish() {
}
});
}
public void submitDeviceInfo() {
Observable.just(true)
.subscribeOn(Schedulers.io())
.map(aBoolean -> {
TrackEventHelper.logEvent(TrackEvent.Api.GATEWAY_UPDATED);
if (!PreferencesManager.get().getBoolean("device_info_uploaded", false)) {
TrackEventHelper.logEvent(new Gson().toJson(DeviceUtils.getInstance().getDeviceInfo()));
......@@ -137,20 +159,9 @@ public class UserPresenter extends BasePresenter<UserApi> {
e.printStackTrace();
}
TrackEventHelper.logEvent(jsonObject.toString());
return true;
}).subscribe();
getCustomerMsg(action);
// EventBus.getDefault().post(ActionEnum.GATEWAY_UPDATED);
}
@Override
public void onError(int code, String msg) {
view.onHttpError(action, msg);
}
@Override
public void onFinish() {
}
});
}
......
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