Show toolbarTitle depending of size (#8633)
(cherry picked from commit fe6aa4358fccf369412bb898c0dcbe747dc4bac8)
This commit is contained in:
parent
d2182ed380
commit
c71de8d1af
@ -1352,14 +1352,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…
x
Reference in New Issue
Block a user