mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 20:01:53 +01:00
Fix being able to make a blank category
This commit is contained in:
parent
e53bae4413
commit
48dae05980
@ -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…
Reference in New Issue
Block a user