mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-25 03:01:52 +01:00
Fixed collasped categories with no items disappearing
This commit is contained in:
parent
03c50cc998
commit
33d15b0814
@ -179,9 +179,13 @@ 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]
|
||||||
|
if (subItems.isNullOrEmpty()) return@f filtersOff
|
||||||
|
else {
|
||||||
|
return@f subItems.any {
|
||||||
matchesFilters(
|
matchesFilters(
|
||||||
it,
|
it,
|
||||||
filterDownloaded,
|
filterDownloaded,
|
||||||
@ -191,10 +195,11 @@ class LibraryPresenter(
|
|||||||
filterMangaType,
|
filterMangaType,
|
||||||
filterTrackers
|
filterTrackers
|
||||||
)
|
)
|
||||||
} ?: false
|
}
|
||||||
|
}
|
||||||
} 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