From fe6aa4358fccf369412bb898c0dcbe747dc4bac8 Mon Sep 17 00:00:00 2001 From: Dexroneum <46288465+Dexroneum@users.noreply.github.com> Date: Sun, 27 Nov 2022 19:57:52 +0000 Subject: [PATCH] Show toolbarTitle depending of size (#8633) --- .../eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt index 2993099393..1703ec9832 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt @@ -774,14 +774,10 @@ class LibraryScreenModel( ): LibraryToolbarTitle { val category = categories.getOrNull(page) ?: return LibraryToolbarTitle(defaultTitle) val categoryName = category.let { - if (it.isSystemCategory) { - defaultCategoryTitle - } else { - it.name - } + if (it.isSystemCategory) defaultCategoryTitle else it.name } - val title = if (showCategoryTabs) defaultTitle else categoryName + val title = if (showCategoryTabs && categories.size <= 1) categoryName else defaultTitle val count = when { !showMangaCount -> null !showCategoryTabs -> getMangaCountForCategory(category)