From ef2c9460b5dc15bb9af6a430fa0a93765debcef4 Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Sat, 1 Oct 2022 09:36:23 +0600 Subject: [PATCH] Fix total item count in library app bar (#8117) --- .../java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index 958e15ad9f..86d19fc723 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -631,7 +631,7 @@ class LibraryPresenter( val count = when { category == null || mangaCountVisibility.not() -> null tabVisibility.not() -> loadedManga[category.id]?.size - else -> loadedManga.values.flatten().distinct().size + else -> loadedManga.values.flatten().distinctBy { it.manga.id }.size } value = when (category) {