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,
|
context: Context,
|
||||||
model: HomeViewModel
|
model: HomeViewModel
|
||||||
) {
|
) {
|
||||||
Row(modifier = Modifier.fillMaxWidth(),
|
Row(
|
||||||
horizontalArrangement = Arrangement.Center,/*, horizontalArrangement = Arrangement.SpaceEvenly*/) {
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
horizontalArrangement = Arrangement.Center,/*, horizontalArrangement = Arrangement.SpaceEvenly*/
|
||||||
|
) {
|
||||||
Button(onClick = {
|
Button(onClick = {
|
||||||
(model::doAction)(ActionHome.DELETION_DB)
|
(model::doAction)(ActionHome.DELETION_DB)
|
||||||
}, colors = ButtonDefaults.buttonColors(containerColor = colorResource(id = R.color.red))) {
|
}, colors = ButtonDefaults.buttonColors(containerColor = colorResource(id = R.color.red))) {
|
||||||
|
|
|
@ -68,19 +68,23 @@ class HomeViewModel(application: Application) : AndroidViewModel(application) {
|
||||||
ActionHome.CREATION -> {
|
ActionHome.CREATION -> {
|
||||||
creation.value = true
|
creation.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionHome.IMPORTATION -> {
|
ActionHome.IMPORTATION -> {
|
||||||
importation.value = true
|
importation.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionHome.MODIFIER -> {
|
ActionHome.MODIFIER -> {
|
||||||
if (selected.value != null) {
|
if (selected.value != null) {
|
||||||
modification.value = true
|
modification.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionHome.DELETION_SELECT -> {
|
ActionHome.DELETION_SELECT -> {
|
||||||
if (selected.value != null) {
|
if (selected.value != null) {
|
||||||
deletionSelect.value = true
|
deletionSelect.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionHome.DELETION_DB -> {
|
ActionHome.DELETION_DB -> {
|
||||||
deletionDB.value = true
|
deletionDB.value = true
|
||||||
}
|
}
|
||||||
|
@ -114,9 +118,11 @@ class HomeViewModel(application: Application) : AndroidViewModel(application) {
|
||||||
fun dismissCreation() {
|
fun dismissCreation() {
|
||||||
creation.value = false
|
creation.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
fun dismissModification() {
|
fun dismissModification() {
|
||||||
modification.value = false
|
modification.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
fun dismissImportation() {
|
fun dismissImportation() {
|
||||||
importation.value = false
|
importation.value = false
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue