Show toolbarTitle depending of size (#8633)
This commit is contained in:
parent
f99b62a069
commit
fe6aa4358f
@ -774,14 +774,10 @@ class LibraryScreenModel(
|
|||||||
): LibraryToolbarTitle {
|
): LibraryToolbarTitle {
|
||||||
val category = categories.getOrNull(page) ?: return LibraryToolbarTitle(defaultTitle)
|
val category = categories.getOrNull(page) ?: return LibraryToolbarTitle(defaultTitle)
|
||||||
val categoryName = category.let {
|
val categoryName = category.let {
|
||||||
if (it.isSystemCategory) {
|
if (it.isSystemCategory) defaultCategoryTitle else it.name
|
||||||
defaultCategoryTitle
|
|
||||||
} else {
|
|
||||||
it.name
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val title = if (showCategoryTabs) defaultTitle else categoryName
|
val title = if (showCategoryTabs && categories.size <= 1) categoryName else defaultTitle
|
||||||
val count = when {
|
val count = when {
|
||||||
!showMangaCount -> null
|
!showMangaCount -> null
|
||||||
!showCategoryTabs -> getMangaCountForCategory(category)
|
!showCategoryTabs -> getMangaCountForCategory(category)
|
||||||
|
Loading…
Reference in New Issue
Block a user