Tweak library search to allow for searching with source language suffix (#8123)
This commit is contained in:
parent
6ac17363ed
commit
488276d498
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.ui.library
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.data.database.models.LibraryManga
|
import eu.kanade.tachiyomi.data.database.models.LibraryManga
|
||||||
import eu.kanade.tachiyomi.source.SourceManager
|
import eu.kanade.tachiyomi.source.SourceManager
|
||||||
|
import eu.kanade.tachiyomi.source.getNameForMangaInfo
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ class LibraryItem(
|
||||||
* @return true if the manga should be included, false otherwise.
|
* @return true if the manga should be included, false otherwise.
|
||||||
*/
|
*/
|
||||||
fun filter(constraint: String): Boolean {
|
fun filter(constraint: String): Boolean {
|
||||||
val sourceName by lazy { sourceManager.getOrStub(manga.source).name }
|
val sourceName by lazy { sourceManager.getOrStub(manga.source).getNameForMangaInfo() }
|
||||||
val genres by lazy { manga.getGenres() }
|
val genres by lazy { manga.getGenres() }
|
||||||
return manga.title.contains(constraint, true) ||
|
return manga.title.contains(constraint, true) ||
|
||||||
(manga.author?.contains(constraint, true) ?: false) ||
|
(manga.author?.contains(constraint, true) ?: false) ||
|
||||||
|
|
Reference in a new issue