mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fix searching collapsed categories when using single category mode
This commit is contained in:
parent
2879db53eb
commit
9e0ebb2ddc
1 changed files with 7 additions and 7 deletions
|
@ -583,18 +583,18 @@ class LibraryPresenter(
|
|||
LibraryItem(it, headerItem)
|
||||
}.toMutableList()
|
||||
|
||||
val categoriesHidden = preferences.collapsedCategories().get().mapNotNull {
|
||||
it.toIntOrNull()
|
||||
}.toMutableSet()
|
||||
val categoriesHidden = if (forceShowAllCategories) {
|
||||
emptySet()
|
||||
} else {
|
||||
preferences.collapsedCategories().get().mapNotNull { it.toIntOrNull() }.toSet()
|
||||
}
|
||||
|
||||
if (categorySet.contains(0)) categories.add(0, createDefaultCategory())
|
||||
if (libraryIsGrouped) {
|
||||
categories.forEach { category ->
|
||||
val catId = category.id ?: return@forEach
|
||||
if (catId > 0 && !categorySet.contains(catId) && (
|
||||
catId !in categoriesHidden ||
|
||||
!showAll
|
||||
)
|
||||
if (catId > 0 && !categorySet.contains(catId) &&
|
||||
(catId !in categoriesHidden || !showAll)
|
||||
) {
|
||||
val headerItem = headerItems[catId]
|
||||
if (headerItem != null) items.add(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue