diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/LibraryManga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/LibraryManga.kt index 5bd127e7bf..3df478f996 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/LibraryManga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/LibraryManga.kt @@ -15,8 +15,10 @@ class LibraryManga : MangaImpl() { category = categoryId } - fun createHide(categoryId: Int): LibraryManga = createBlank(categoryId).apply { - status = -1 - } + fun createHide(categoryId: Int, title: String): LibraryManga = + createBlank(categoryId).apply { + this.title = title + status = -1 + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt index 17d419d08e..55c9234f46 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt @@ -130,7 +130,7 @@ class LibraryItem( * @return true if the manga should be included, false otherwise. */ override fun filter(constraint: String): Boolean { - if (manga.isBlank()) + if (manga.isBlank() && manga.title.isBlank()) return constraint.isEmpty() val sourceManager by injectLazy() val sourceName = if (manga.source == 0L) "Local" else 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 a067e0d5ca..84a56c9103 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 @@ -443,11 +443,15 @@ class LibraryPresenter( ) ) } else if (catId in categoriesHidden) { - items.removeAll { it.manga.category == catId } + val mangaToRemove = items.filter { it.manga.category == catId } + val mergedTitle = mangaToRemove.joinToString("-") { + it.manga.title + } + items.removeAll(mangaToRemove) val headerItem = headerItems[catId] if (headerItem != null) items.add( LibraryItem( - LibraryManga.createHide(catId), + LibraryManga.createHide(catId, mergedTitle), libraryLayout, preferences.uniformGrid(), preferences.alwaysShowSeeker(),