Disallow creation of blank tags
This commit is contained in:
parent
24895ca612
commit
32b4a43f71
@ -548,6 +548,7 @@ fun ReorderFavoritesGrid(viewModel: EditFavoritesSheetVM) {
|
|||||||
singleLine = true,
|
singleLine = true,
|
||||||
keyboardActions = KeyboardActions(
|
keyboardActions = KeyboardActions(
|
||||||
onDone = {
|
onDone = {
|
||||||
|
if (newTag.isBlank()) return@KeyboardActions
|
||||||
viewModel.createNewTag(newTag)
|
viewModel.createNewTag(newTag)
|
||||||
showAddMenu = false
|
showAddMenu = false
|
||||||
}
|
}
|
||||||
@ -558,6 +559,7 @@ fun ReorderFavoritesGrid(viewModel: EditFavoritesSheetVM) {
|
|||||||
trailingIcon = {
|
trailingIcon = {
|
||||||
Icon(
|
Icon(
|
||||||
modifier = Modifier.clickable {
|
modifier = Modifier.clickable {
|
||||||
|
if (newTag.isBlank()) return@clickable
|
||||||
viewModel.createNewTag(newTag)
|
viewModel.createNewTag(newTag)
|
||||||
showAddMenu = false
|
showAddMenu = false
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user