Немного лишнее убрал
This commit is contained in:
parent
eb3bc2ea3d
commit
bce45a28f0
@ -31,7 +31,6 @@ import kotlinx.coroutines.launch
|
||||
|
||||
@Composable
|
||||
fun ProfileForm(item: User, userDao: UserDao, navHostController: NavHostController) {
|
||||
val isFormVisible = remember { mutableStateOf(false) }
|
||||
var email by remember { mutableStateOf(item.email) }
|
||||
var name by remember { mutableStateOf(item.name) }
|
||||
var password by remember { mutableStateOf(item.password) }
|
||||
@ -39,7 +38,6 @@ fun ProfileForm(item: User, userDao: UserDao, navHostController: NavHostControll
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
// Поле ввода для бренда
|
||||
TextField(
|
||||
value = email,
|
||||
onValueChange = { email = it },
|
||||
@ -50,7 +48,6 @@ fun ProfileForm(item: User, userDao: UserDao, navHostController: NavHostControll
|
||||
colors = TextFieldDefaults.textFieldColors(backgroundColor = Color.White)
|
||||
)
|
||||
|
||||
// Поле ввода для модели
|
||||
TextField(
|
||||
value = name,
|
||||
onValueChange = { name = it },
|
||||
@ -61,7 +58,6 @@ fun ProfileForm(item: User, userDao: UserDao, navHostController: NavHostControll
|
||||
colors = TextFieldDefaults.textFieldColors(backgroundColor = Color.White)
|
||||
)
|
||||
|
||||
// Поле ввода для цвета
|
||||
TextField(
|
||||
value = password,
|
||||
onValueChange = { password = it },
|
||||
@ -86,7 +82,6 @@ fun ProfileForm(item: User, userDao: UserDao, navHostController: NavHostControll
|
||||
|
||||
userDao.updateUser(newUser)
|
||||
}
|
||||
isFormVisible.value = false
|
||||
navHostController.navigate("ListProduct")
|
||||
},
|
||||
shape = RoundedCornerShape(15.dp)
|
||||
@ -104,7 +99,6 @@ fun ProfileForm(item: User, userDao: UserDao, navHostController: NavHostControll
|
||||
.fillMaxWidth()
|
||||
.padding(9.dp),
|
||||
onClick = {
|
||||
isFormVisible.value = false
|
||||
navHostController.navigate("ListProduct")
|
||||
},
|
||||
shape = RoundedCornerShape(15.dp)
|
||||
|
Loading…
Reference in New Issue
Block a user