Always show library tabs and counts when searching

Closes #8680
This commit is contained in:
arkon
2022-12-05 10:06:41 -05:00
parent c288e6b8fa
commit 3f9820ac79
4 changed files with 3 additions and 6 deletions

View File

@@ -747,7 +747,6 @@ class LibraryScreenModel(
val selectionMode = selection.isNotEmpty()
val categories = library.keys.toList()
private val onlyDefaultCategory = categories.size == 1 && categories[0].isSystemCategory
val libraryCount by lazy {
library.values
@@ -765,7 +764,7 @@ class LibraryScreenModel(
}
fun getMangaCountForCategory(category: Category): Int? {
return if (showMangaCount) library[category]?.size else null
return if (showMangaCount || !searchQuery.isNullOrEmpty()) library[category]?.size else null
}
fun getToolbarTitle(

View File

@@ -170,8 +170,7 @@ object LibraryTab : Tab {
selection = state.selection,
contentPadding = contentPadding,
currentPage = { screenModel.activeCategory },
isLibraryEmpty = state.libraryCount == 0,
showPageTabs = state.showCategoryTabs,
showPageTabs = state.showCategoryTabs || !state.searchQuery.isNullOrEmpty(),
onChangeCurrentPage = { screenModel.activeCategory = it },
onMangaClicked = { navigator.push(MangaScreen(it)) },
onContinueReadingClicked = { it: LibraryManga ->