fix: -saving the state of the entered text on the authorization screen when rotating the screen

This commit is contained in:
m-kuchergin 2026-02-24 20:01:36 +03:00
parent 6cb08e11be
commit e15483c4dc
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
package ru.myitschool.work.core
object Constants {
const val HOST = "http://localhost:8090"
const val HOST = "http://10.0.0.14:49183"
const val AUTH_URL = "/auth"
const val INFO_URL = "/info"
const val BOOKING_URL = "/booking"

View File

@ -18,6 +18,7 @@ import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@ -76,7 +77,7 @@ private fun Content(
viewModel: AuthViewModel,
state: AuthState.Data
) {
var inputText by remember { mutableStateOf("") }
var inputText by rememberSaveable { mutableStateOf("") }
Spacer(modifier = Modifier.size(16.dp))
TextField(
modifier = Modifier.testTag(TestIds.Auth.CODE_INPUT).fillMaxWidth(),