Merge branch 'dev_robotaxi-d-app-module_251_220125_2.5.1' into dev_MogoAP_eagle-220_211207_8.0.17_merge
# Conflicts: # core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt
This commit is contained in:
@@ -95,7 +95,7 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
|
||||
private var autoPilotBadCaseView: AutoPilotBadCaseView? = null
|
||||
|
||||
private var onBadCaseShow: (() -> Unit)? = null
|
||||
private var onBadCaseShow: (() -> View)? = null
|
||||
private var onBadCaseHide: (() -> Unit)? = null
|
||||
|
||||
companion object {
|
||||
@@ -324,19 +324,12 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
}
|
||||
dismissBadCaseEntryAfterSomeTime()
|
||||
} else {
|
||||
onBadCaseShow?.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun showBadCaseEntrance(entrance: View) {
|
||||
entrance.lifecycleOwner.lifecycle.addObserver(badCaseEntranceObserver)
|
||||
autoPilotBadCaseEntrance = entrance
|
||||
lifecycleScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
val dao = Repository.dao()
|
||||
dao.getAllUnConsumedRecords()?.first()?.let {
|
||||
showBadCaseEntrance(it)
|
||||
val view = onBadCaseShow?.invoke()
|
||||
if (view != null) {
|
||||
view.lifecycleOwner.lifecycle.addObserver(badCaseEntranceObserver)
|
||||
view.visibility = View.GONE
|
||||
autoPilotBadCaseEntrance = view
|
||||
showBadCaseEntrance(record)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -350,7 +343,7 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
}
|
||||
}
|
||||
|
||||
override fun registerBadCaseCallback(onShow: () -> Unit, onHide: (() -> Unit)?) {
|
||||
override fun registerBadCaseCallback(onShow: () -> View, onHide: (() -> Unit)?) {
|
||||
onBadCaseShow = onShow
|
||||
onBadCaseHide = onHide
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user