diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt index f56ad21d6..47671626d 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt @@ -85,8 +85,8 @@ class SearchViewModel(application: Application) : BaseViewModel(application) { private fun precisionSearch(searchBooks: List) { val books = arrayListOf() searchBooks.forEach { searchBook -> - if (searchBook.name.equals(searchKey, true) - || searchBook.author.equals(searchKey, true) + if (searchBook.name.contains(searchKey, true) + || searchBook.author.contains(searchKey, true) ) books.add(searchBook) } App.db.searchBookDao().insert(*books.toTypedArray())