Update MainActivity.kt

fix
This commit is contained in:
zeus
2025-12-24 12:26:56 +08:00
parent 3085c72bf1
commit 0dbfefdabe
@@ -293,7 +293,7 @@ class MainActivity : BaseActivity<MainDesign>() {
} }
private suspend fun configRequesting(){ private suspend fun configRequesting(retryCount: Int = 0){
val gson = Gson() val gson = Gson()
val currentTime = System.currentTimeMillis() val currentTime = System.currentTimeMillis()
/*apiService.getConfig().let { /*apiService.getConfig().let {
@@ -333,7 +333,23 @@ class MainActivity : BaseActivity<MainDesign>() {
performSubscrite() performSubscrite()
} }
}else{ }else{
configRequesting() if (retryCount < 3) {
configRequesting(retryCount + 1)
} else {
withContext(Dispatchers.Main) {
LoadingDialog.hide()
showCustomDialog(
title = "提示",
message = "初始化失败,请检查配置是否正确",
positiveButtonText = "确定",
negativeButtonText = "",
onPositiveClick = {
},
onNegativeClick = {
}
)
}
}
} }
} }