mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-25 02:31:52 +01:00
Fixed collasped categories with no items disappearing
This commit is contained in:
parent
03c50cc998
commit
33d15b0814
@ -179,22 +179,27 @@ class LibraryPresenter(
|
|||||||
|
|
||||||
val filterTrackers = FilterBottomSheet.FILTER_TRACKER
|
val filterTrackers = FilterBottomSheet.FILTER_TRACKER
|
||||||
|
|
||||||
|
val filtersOff = filterDownloaded == 0 && filterUnread == 0 && filterCompleted == 0 && filterTracked == 0 && filterMangaType == 0
|
||||||
return items.filter f@{ item ->
|
return items.filter f@{ item ->
|
||||||
if (item.manga.status == -1) {
|
if (item.manga.status == -1) {
|
||||||
return@f sectionedLibraryItems[item.manga.category]?.any {
|
val subItems = sectionedLibraryItems[item.manga.category]
|
||||||
matchesFilters(
|
if (subItems.isNullOrEmpty()) return@f filtersOff
|
||||||
it,
|
else {
|
||||||
filterDownloaded,
|
return@f subItems.any {
|
||||||
filterUnread,
|
matchesFilters(
|
||||||
filterCompleted,
|
it,
|
||||||
filterTracked,
|
filterDownloaded,
|
||||||
filterMangaType,
|
filterUnread,
|
||||||
filterTrackers
|
filterCompleted,
|
||||||
)
|
filterTracked,
|
||||||
} ?: false
|
filterMangaType,
|
||||||
|
filterTrackers
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (item.manga.isBlank()) {
|
} else if (item.manga.isBlank()) {
|
||||||
return@f if (showAllCategories) {
|
return@f if (showAllCategories) {
|
||||||
filterDownloaded == 0 && filterUnread == 0 && filterCompleted == 0 && filterTracked == 0 && filterMangaType == 0
|
filtersOff
|
||||||
} else {
|
} else {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user