[6.1.0]
[bugfix] [轨迹过长进行子线程处理]
This commit is contained in:
@@ -11,6 +11,7 @@ import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.biz.network.OchCommonSubscribeImpl
|
||||
import com.mogo.och.common.module.biz.network.interceptor.transformIoTry
|
||||
import com.mogo.och.common.module.biz.network.interceptor.transformTry
|
||||
|
||||
/**
|
||||
@@ -145,7 +146,7 @@ object BusPassengerServiceManager {
|
||||
if(beforeNet()){
|
||||
return
|
||||
}
|
||||
mBusPassengerServiceApi.queryLineLocation(lineId = lineId).transformTry()
|
||||
mBusPassengerServiceApi.queryLineLocation(lineId = lineId).transformIoTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "serviceEnd"))
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import android.graphics.Canvas
|
||||
import android.view.View
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.elegant.utils.UiThreadHandler
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
@@ -18,7 +19,6 @@ import com.mogo.eagle.core.function.view.SiteMarkerBean
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.charter.passenger.R
|
||||
import com.mogo.och.charter.passenger.bean.response.LineInfoResponse
|
||||
import com.mogo.och.charter.passenger.bean.response.OrderInfoResponse
|
||||
@@ -164,9 +164,9 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
|
||||
}
|
||||
}
|
||||
UiThreadHandler.post({
|
||||
UiThreadHandler.post{
|
||||
mView?.showNoviceGuidanceFragment()
|
||||
}, UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -250,9 +250,11 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
}
|
||||
val indexInStation =
|
||||
getStationMiddleTrajectory(trajectoryListMogoLocation, sites)
|
||||
val drawStationInfo = drawStationInfo(sites)
|
||||
mView?.drawOverMapViewTrajectory(indexInStation)
|
||||
mView?.includePoint(drawStationInfo+indexInStation)
|
||||
UiThreadHandler.post {
|
||||
val drawStationInfo = drawStationInfo(sites)
|
||||
mView?.includePoint(drawStationInfo+indexInStation)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,6 +399,12 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
|
||||
else -> {}
|
||||
}
|
||||
} else {
|
||||
when (CallerAutoPilotStatusListenerManager.getState()) {
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
|
||||
ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
|
||||
return false
|
||||
}
|
||||
}
|
||||
ToastCharterUtils.showToastShort("请停车后再修改目的地~")
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -10,4 +10,10 @@ fun <T : BaseData> Observable<T>.transformTry():Observable<T> {
|
||||
.retryWhen(RetryWithTime())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
}
|
||||
fun <T : BaseData> Observable<T>.transformIoTry():Observable<T> {
|
||||
return flatMap(FRetryWithTime<T>())
|
||||
.retryWhen(RetryWithTime())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(Schedulers.io())
|
||||
}
|
||||
Reference in New Issue
Block a user