From 8d5f7985915f45bd50ad889707a4049b50400124 Mon Sep 17 00:00:00 2001 From: jmir1 <43830312+jmir1@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:29:04 +0200 Subject: [PATCH] show correct number of items in the library tit... (#5516) ...le, even when all manga are in a category that isn't the default category. --- .../java/eu/kanade/tachiyomi/ui/library/LibraryController.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 85c9557b69..ed83981891 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -147,11 +147,8 @@ class LibraryController( if (preferences.categoryNumberOfItems().get() && libraryMangaRelay.hasValue()) { libraryMangaRelay.value.mangas.let { mangaMap -> - if (!showCategoryTabs) { + if (!showCategoryTabs || adapter?.categories?.size == 1) { title += " (${mangaMap[currentCategory?.id]?.size ?: 0})" - } else if (adapter?.categories?.size == 1) { - // Only "Default" category - title += " (${mangaMap[0]?.size ?: 0})" } } }