Fetch download counts if library is filtered by downloaded
Fixes #8277 (cherry picked from commit 9792a6cb780d0db3a962fdf2e60ef028b3ceb07f) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt
This commit is contained in:
parent
dc6215dd3b
commit
8231aa45d7
@ -495,13 +495,14 @@ class LibraryPresenter(
|
|||||||
val libraryMangasFlow = combine(
|
val libraryMangasFlow = combine(
|
||||||
getLibraryManga.subscribe(),
|
getLibraryManga.subscribe(),
|
||||||
libraryPreferences.downloadBadge().changes(),
|
libraryPreferences.downloadBadge().changes(),
|
||||||
|
libraryPreferences.filterDownloaded().changes(),
|
||||||
downloadCache.changes,
|
downloadCache.changes,
|
||||||
) { libraryMangaList, downloadBadgePref, _ ->
|
) { libraryMangaList, downloadBadgePref, filterDownloadedPref, _ ->
|
||||||
libraryMangaList
|
libraryMangaList
|
||||||
.map { libraryManga ->
|
.map { libraryManga ->
|
||||||
// Display mode based on user preference: take it from global library setting or category
|
// Display mode based on user preference: take it from global library setting or category
|
||||||
LibraryItem(libraryManga).apply {
|
LibraryItem(libraryManga).apply {
|
||||||
downloadCount = if (downloadBadgePref) {
|
downloadCount = if (downloadBadgePref || filterDownloadedPref == State.INCLUDE.value) {
|
||||||
// SY -->
|
// SY -->
|
||||||
if (libraryManga.manga.source == MERGED_SOURCE_ID) {
|
if (libraryManga.manga.source == MERGED_SOURCE_ID) {
|
||||||
runBlocking {
|
runBlocking {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user