diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt index a7c890194e..3dbaf706e5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt @@ -60,7 +60,9 @@ class LibraryCategoryAdapter(val controller: LibraryController) : mangas = list.toList() performFilter() + } + fun setItemsPerCategoryMap() { itemsPerCategory = headerItems.map { header -> (header as LibraryHeaderItem).catId to getSectionItemPositions(header).size }.toMap() @@ -131,6 +133,7 @@ class LibraryCategoryAdapter(val controller: LibraryController) : updateDataSet(mangas.filter { it.filter(s) }) } isLongPressDragEnabled = libraryListener.canDrag() && s.isNullOrBlank() + setItemsPerCategoryMap() } suspend fun performFilterAsync() { @@ -145,6 +148,7 @@ class LibraryCategoryAdapter(val controller: LibraryController) : updateDataSet(filteredManga) } isLongPressDragEnabled = libraryListener.canDrag() && s.isNullOrBlank() + setItemsPerCategoryMap() } private fun getFirstLetter(name: String): String { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0368cd2bb4..79f629bccd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -611,6 +611,8 @@ Midnight Dusk Spring Blossom Strawberry Daiquiri + A Brighter You + Monet Dark Yotsuba Black \'n\' Red Hot Pink