mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 03:39:19 +01:00
Fixed searching not updating category count
This commit is contained in:
parent
3ad57497c9
commit
513034b431
@ -60,7 +60,9 @@ class LibraryCategoryAdapter(val controller: LibraryController) :
|
|||||||
mangas = list.toList()
|
mangas = list.toList()
|
||||||
|
|
||||||
performFilter()
|
performFilter()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setItemsPerCategoryMap() {
|
||||||
itemsPerCategory = headerItems.map { header ->
|
itemsPerCategory = headerItems.map { header ->
|
||||||
(header as LibraryHeaderItem).catId to getSectionItemPositions(header).size
|
(header as LibraryHeaderItem).catId to getSectionItemPositions(header).size
|
||||||
}.toMap()
|
}.toMap()
|
||||||
@ -131,6 +133,7 @@ class LibraryCategoryAdapter(val controller: LibraryController) :
|
|||||||
updateDataSet(mangas.filter { it.filter(s) })
|
updateDataSet(mangas.filter { it.filter(s) })
|
||||||
}
|
}
|
||||||
isLongPressDragEnabled = libraryListener.canDrag() && s.isNullOrBlank()
|
isLongPressDragEnabled = libraryListener.canDrag() && s.isNullOrBlank()
|
||||||
|
setItemsPerCategoryMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun performFilterAsync() {
|
suspend fun performFilterAsync() {
|
||||||
@ -145,6 +148,7 @@ class LibraryCategoryAdapter(val controller: LibraryController) :
|
|||||||
updateDataSet(filteredManga)
|
updateDataSet(filteredManga)
|
||||||
}
|
}
|
||||||
isLongPressDragEnabled = libraryListener.canDrag() && s.isNullOrBlank()
|
isLongPressDragEnabled = libraryListener.canDrag() && s.isNullOrBlank()
|
||||||
|
setItemsPerCategoryMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getFirstLetter(name: String): String {
|
private fun getFirstLetter(name: String): String {
|
||||||
|
@ -611,6 +611,8 @@
|
|||||||
<string name="midnight_dusk">Midnight Dusk</string>
|
<string name="midnight_dusk">Midnight Dusk</string>
|
||||||
<string name="spring_blossom">Spring Blossom</string>
|
<string name="spring_blossom">Spring Blossom</string>
|
||||||
<string name="strawberry_daiquiri">Strawberry Daiquiri</string>
|
<string name="strawberry_daiquiri">Strawberry Daiquiri</string>
|
||||||
|
<string name="a_brighter_you">A Brighter You</string>
|
||||||
|
<string name="monet_dark">Monet Dark</string>
|
||||||
<string name="yotsuba">Yotsuba</string>
|
<string name="yotsuba">Yotsuba</string>
|
||||||
<string name="black_and_red">Black \'n\' Red</string>
|
<string name="black_and_red">Black \'n\' Red</string>
|
||||||
<string name="hot_pink">Hot Pink</string>
|
<string name="hot_pink">Hot Pink</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user