mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 17:11:54 +01:00
Added ability to search manga titles in collasped category
This commit is contained in:
parent
a4178f5d28
commit
f0cb967f6a
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<SourceManager>()
|
||||
val sourceName = if (manga.source == 0L) "Local" else
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user