checkpoint 1
This commit is contained in:
parent
614640615f
commit
3c4702b0b0
@ -110,10 +110,17 @@ private fun Content(
|
||||
) {
|
||||
Text(stringResource(R.string.auth_sign_in))
|
||||
}
|
||||
if (state.error != null) {
|
||||
if (state.error != "Connection refused" && state.error != null) {
|
||||
Text(
|
||||
modifier = Modifier.testTag(TestIds.Auth.ERROR),
|
||||
text = state.error,
|
||||
text = "Неизвестная ошибка: ${state.error}",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = Color.Red,
|
||||
)
|
||||
} else if (state.error == "Connection refused") {
|
||||
Text(
|
||||
modifier = Modifier.testTag(TestIds.Auth.ERROR),
|
||||
text = "Отсутствует интернет-соединение",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = Color.Red,
|
||||
)
|
||||
|
||||
@ -41,7 +41,7 @@ class AuthViewModel : ViewModel() {
|
||||
onFailure = { error ->
|
||||
updateStateIfData { oldState ->
|
||||
oldState.copy(
|
||||
error = "Неизвестная ошибка: ${error.message}"
|
||||
error = error.message
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user