Commit b7c9e6a9 by 宁斌

1、清機調整

parent c96f96c8
...@@ -117,25 +117,13 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon ...@@ -117,25 +117,13 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
.build(); .build();
mModel.sendSettlement(requestBody) mModel.sendSettlement(requestBody)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
// .doOnSubscribe(disposable -> mRootView.showLoading(null)) .doOnSubscribe(disposable -> mRootView.showLoading(null))
.subscribeOn(AndroidSchedulers.mainThread()) .subscribeOn(AndroidSchedulers.mainThread())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
// .doAfterTerminate(() -> mRootView.hideLoading()) .doAfterTerminate(() -> mRootView.hideLoading())
.compose(RxLifecycleUtils.bindToLifecycle(mRootView)) .compose(RxLifecycleUtils.bindToLifecycle(mRootView))
.subscribe(new ErrorHandleSubscriber<SendSettlement>(mErrorHandler) { .subscribe(new ErrorHandleSubscriber<SendSettlement>(mErrorHandler) {
// @Override
// public void onComplete() {
// super.onComplete();
// mRootView.hideLoading();
// }
//
// @Override
// public void onError(Throwable t) {
// super.onError(t);
// mRootView.hideLoading();
// }
@Override @Override
public void onNext(@NonNull SendSettlement info) { public void onNext(@NonNull SendSettlement info) {
if (info != null && info.isSuccess()) { if (info != null && info.isSuccess()) {
......
...@@ -526,21 +526,9 @@ public class SettlementReportActivity extends BaseActivity<SettlementReportPrese ...@@ -526,21 +526,9 @@ public class SettlementReportActivity extends BaseActivity<SettlementReportPrese
if (mPresenter != null) { if (mPresenter != null) {
mPresenter.getSettlementReport(); mPresenter.getSettlementReport();
} }
// handler.sendEmptyMessage(0);
}); });
} }
private Handler handler = new Handler(){
@Override
public void handleMessage(Message msg) {
//打印完之後,清除view
PrintTransitUtils.getInstance().setPrintView(null);
if (mPresenter != null) {
mPresenter.getSettlementReport();
}
}
};
@NotNull @NotNull
private View initPrintView() { private View initPrintView() {
View view = View.inflate(mContext, R.layout.layout_settlement_report, null); View view = View.inflate(mContext, R.layout.layout_settlement_report, null);
......
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