From 48dae059802d0eb3ae7d2dee50e964af3495b710 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Sat, 10 Apr 2021 23:33:12 -0400 Subject: [PATCH] Fix being able to make a blank category --- .../eu/kanade/tachiyomi/ui/category/CategoryController.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt index 65b340f8fd..fe83205e9c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt @@ -113,6 +113,10 @@ class CategoryController(bundle: Bundle? = null) : override fun onCategoryRename(position: Int, newName: String): Boolean { 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) { return (presenter.createCategory(newName)) }