修复无网崩溃

This commit is contained in:
2025-09-05 16:51:19 +08:00
parent b4ed311978
commit e61fb2ad79

View File

@@ -84,6 +84,7 @@ fun LoginPage() {
mutableStateOf(false) mutableStateOf(false)
} }
suspend fun checkGoogleLoginEnable() { suspend fun checkGoogleLoginEnable() {
try {
val result = dictService.getDistList( val result = dictService.getDistList(
listOf( listOf(
ConstVars.DICT_KEY_ENABLE_GOOGLE_LOGIN, ConstVars.DICT_KEY_ENABLE_GOOGLE_LOGIN,
@@ -99,6 +100,9 @@ fun LoginPage() {
showGoogleLogin = false showGoogleLogin = false
} }
AppState.enableGoogleLogin = showGoogleLogin AppState.enableGoogleLogin = showGoogleLogin
} catch (_: Exception) {
}
} }
LaunchedEffect(Unit) { LaunchedEffect(Unit) {
statusBarController.setStatusBarColor(Color.Transparent, darkIcons = !AppState.darkMode) statusBarController.setStatusBarColor(Color.Transparent, darkIcons = !AppState.darkMode)