mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 01:55:09 +01:00
Searching in library now has genre searching
This commit is contained in:
parent
011510574d
commit
898792ce8e
@ -59,7 +59,15 @@ class LibraryItem(val manga: LibraryManga, private val libraryAsList: Preference
|
|||||||
*/
|
*/
|
||||||
override fun filter(constraint: String): Boolean {
|
override fun filter(constraint: String): Boolean {
|
||||||
return manga.title.contains(constraint, true) ||
|
return manga.title.contains(constraint, true) ||
|
||||||
(manga.author?.contains(constraint, true) ?: false)
|
(manga.author?.contains(constraint, true) ?: false) ||
|
||||||
|
(if (constraint.startsWith("-"))
|
||||||
|
manga.genre?.split(", ")?.find {
|
||||||
|
it.toLowerCase() == constraint.substringAfter("-").toLowerCase()
|
||||||
|
} == null
|
||||||
|
else
|
||||||
|
manga.genre?.split(", ")?.find {
|
||||||
|
it.toLowerCase() == constraint.toLowerCase() } != null
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user