[乘客屏切换主Fragment]
This commit is contained in:
yangyakun
2024-04-17 14:31:55 +08:00
parent 0160907302
commit aa3bc00cec
7 changed files with 61 additions and 18 deletions

View File

@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.common.module.biz.lansocket.LoginLanDriverSocket
import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket
import com.mogo.och.common.module.constant.OchCommonConst
@@ -60,8 +61,9 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
private fun showFragment() {
val supportFragmentManager: FragmentManager? = activity?.supportFragmentManager
val fragment = if (LoginStatusManager.isLogin()) {
val fragment = getFragment()
injectStatusBar()
getFragment()
fragment
} else {
removeStatusBar()
CallerHmiManager.hideToolsView()
@@ -140,7 +142,9 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
override fun onStatusChange(currentStatus: LoginStatusEnum) {
d(TAG, "登录状态发生改变 ${currentStatus}")
showFragment()
UiThreadHandler.post {
showFragment()
}
}
override fun onBusinessChange(businessEnum: BusinessEnum) {