[2.11.0] [fix]1、bus美化模式结束任务自驾按钮展示调整 2、taxi订单列表catch异常
This commit is contained in:
@@ -56,7 +56,6 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
private int currentAutopilotStatus = -1;
|
||||
private List<BusStationBean> mStationList = new ArrayList<>();
|
||||
private int mCurrentStation = 0;
|
||||
// private boolean isRestartAutopilot = false;
|
||||
|
||||
public BusPresenter(BusFragment view) {
|
||||
super(view);
|
||||
@@ -177,9 +176,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE;
|
||||
// 设置UI【自动驾驶】按钮是否展示
|
||||
runOnUIThread(() -> mView.onAutopilotEnableChange(true));
|
||||
// if (BusOrderModel.getInstance().isGoingToNextStation()) {
|
||||
// runOnUIThread(() -> mView.hideSlidePanel());
|
||||
// }
|
||||
|
||||
if (FunctionBuildConfig.isDemoMode
|
||||
&& (
|
||||
(mCurrentStation >= 0 && mCurrentStation <= mStationList.size() - 1)
|
||||
@@ -189,9 +186,9 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能");
|
||||
return;
|
||||
}
|
||||
// 改变UI自动驾驶状态
|
||||
runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus));
|
||||
}
|
||||
// 改变UI自动驾驶状态
|
||||
runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus));
|
||||
break;
|
||||
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING:
|
||||
if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
@@ -204,9 +201,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
break;
|
||||
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE:
|
||||
if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) {
|
||||
if (currentAutopilotStatus == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {//2-->0语音提示
|
||||
// AIAssist.getInstance( getContext() ).speakTTSVoice( "自动驾驶已停止,请人工接管" );
|
||||
}
|
||||
|
||||
currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE;
|
||||
if (FunctionBuildConfig.isDemoMode
|
||||
&& (
|
||||
@@ -218,10 +213,10 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能");
|
||||
return;
|
||||
}
|
||||
runOnUIThread(() -> {
|
||||
mView.onAutopilotStatusChanged(currentAutopilotStatus);
|
||||
});
|
||||
}
|
||||
runOnUIThread(() -> {
|
||||
mView.onAutopilotStatusChanged(currentAutopilotStatus);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
runOnUIThread(() -> mView.onAutopilotEnableChange(false));
|
||||
|
||||
@@ -266,27 +266,31 @@ public class TaxiPersonalDialogFragment extends DialogFragment implements View.O
|
||||
}
|
||||
|
||||
public void onOrdersListPageRefresh(List<OrderQueryRespBean.Result> ordersList){
|
||||
if (null == ordersList && mNextPage == 0){//无数据
|
||||
mOrdersRv.setVisibility(View.GONE);
|
||||
mNoDatas.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
}
|
||||
mOrdersRv.setVisibility(View.VISIBLE);
|
||||
mNoDatas.setVisibility(View.GONE);
|
||||
if ((null == ordersList) || (ordersList.size() < mPerPageSize && mNextPage > 0)){//已经没有更多数据,提示无数据
|
||||
//已经没有更多数据
|
||||
serverHadNoData = true;
|
||||
try {
|
||||
if (null == ordersList && mNextPage == 0){//无数据
|
||||
mOrdersRv.setVisibility(View.GONE);
|
||||
mNoDatas.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
}
|
||||
mOrdersRv.setVisibility(View.VISIBLE);
|
||||
mNoDatas.setVisibility(View.GONE);
|
||||
if ((null == ordersList) || (ordersList.size() < mPerPageSize && mNextPage > 0)){//已经没有更多数据,提示无数据
|
||||
//已经没有更多数据
|
||||
serverHadNoData = true;
|
||||
orders.addAll(ordersList);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mNextPage = mNextPage +1;
|
||||
return;
|
||||
}
|
||||
serverHadNoData = false;
|
||||
orders.addAll(ordersList);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
if(mAdapter!=null) {
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
mNextPage = mNextPage +1;
|
||||
return;
|
||||
}catch (Exception e){
|
||||
e.fillInStackTrace();
|
||||
}
|
||||
serverHadNoData = false;
|
||||
orders.addAll(ordersList);
|
||||
if(mAdapter!=null) {
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
mNextPage = mNextPage +1;
|
||||
}
|
||||
|
||||
class OrderAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
|
||||
|
||||
Reference in New Issue
Block a user