修复书籍搜索“精准搜索”

pull/74/head
Administrator 5 years ago
parent cf41c2d162
commit 527b8f25a0
  1. 4
      app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt

@ -72,8 +72,8 @@ class SearchViewModel(application: Application) : BaseViewModel(application) {
val books = arrayListOf<SearchBook>()
searchBooks.forEach { searchBook ->
if (context.getPrefBoolean(PreferKey.precisionSearch)) {
if (searchBook.name.contains(searchKey)
|| searchBook.author.contains(searchKey)
if (searchBook.name.equals(searchKey, true)
|| searchBook.author.equals(searchKey, true)
) books.add(searchBook)
} else
books.add(searchBook)

Loading…
Cancel
Save