Show toolbarTitle depending of size (#8633)

This commit is contained in:
Dexroneum 2022-11-27 19:57:52 +00:00 committed by GitHub
parent f99b62a069
commit fe6aa4358f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)