mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fix being able to make a blank category
This commit is contained in:
parent
e53bae4413
commit
48dae05980
1 changed files with 4 additions and 0 deletions
|
@ -113,6 +113,10 @@ class CategoryController(bundle: Bundle? = null) :
|
||||||
|
|
||||||
override fun onCategoryRename(position: Int, newName: String): Boolean {
|
override fun onCategoryRename(position: Int, newName: String): Boolean {
|
||||||
val category = adapter?.getItem(position)?.category ?: return false
|
val category = adapter?.getItem(position)?.category ?: return false
|
||||||
|
if (newName.isBlank()) {
|
||||||
|
activity?.toast(R.string.category_cannot_be_blank)
|
||||||
|
return false
|
||||||
|
}
|
||||||
if (category.order == CREATE_CATEGORY_ORDER) {
|
if (category.order == CREATE_CATEGORY_ORDER) {
|
||||||
return (presenter.createCategory(newName))
|
return (presenter.createCategory(newName))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue