fmt
This commit is contained in:
parent
a98e9d34e3
commit
9ed25aaab4
3 changed files with 25 additions and 17 deletions
|
@ -119,8 +119,10 @@ private fun DeleteRow(
|
|||
context: Context,
|
||||
model: HomeViewModel
|
||||
) {
|
||||
Row(modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.Center,/*, horizontalArrangement = Arrangement.SpaceEvenly*/) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.Center,/*, horizontalArrangement = Arrangement.SpaceEvenly*/
|
||||
) {
|
||||
Button(onClick = {
|
||||
(model::doAction)(ActionHome.DELETION_DB)
|
||||
}, colors = ButtonDefaults.buttonColors(containerColor = colorResource(id = R.color.red))) {
|
||||
|
|
|
@ -68,19 +68,23 @@ class HomeViewModel(application: Application) : AndroidViewModel(application) {
|
|||
ActionHome.CREATION -> {
|
||||
creation.value = true
|
||||
}
|
||||
|
||||
ActionHome.IMPORTATION -> {
|
||||
importation.value = true
|
||||
}
|
||||
|
||||
ActionHome.MODIFIER -> {
|
||||
if (selected.value != null) {
|
||||
modification.value = true
|
||||
}
|
||||
}
|
||||
|
||||
ActionHome.DELETION_SELECT -> {
|
||||
if (selected.value != null) {
|
||||
deletionSelect.value = true
|
||||
}
|
||||
}
|
||||
|
||||
ActionHome.DELETION_DB -> {
|
||||
deletionDB.value = true
|
||||
}
|
||||
|
@ -114,9 +118,11 @@ class HomeViewModel(application: Application) : AndroidViewModel(application) {
|
|||
fun dismissCreation() {
|
||||
creation.value = false
|
||||
}
|
||||
|
||||
fun dismissModification() {
|
||||
modification.value = false
|
||||
}
|
||||
|
||||
fun dismissImportation() {
|
||||
importation.value = false
|
||||
}
|
||||
|
|
Reference in a new issue