pull/433/head
gedoor 4 years ago
parent c6d063301a
commit 33c8ddb86c
  1. 4
      app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt

@ -144,7 +144,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application),
} }
} }
if (!scope.isActive) return if (!scope.isActive) return
searchBooks.sortWith(Comparator { o1, o2 -> searchBooks.sortWith { o1, o2 ->
if (o1.name == searchKey && o2.name != searchKey) { if (o1.name == searchKey && o2.name != searchKey) {
1 1
} else if (o1.name != searchKey && o2.name == searchKey) { } else if (o1.name != searchKey && o2.name == searchKey) {
@ -168,7 +168,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application),
} else { } else {
0 0
} }
}) }
if (!scope.isActive) return if (!scope.isActive) return
searchBooks = copyDataS searchBooks = copyDataS
upAdapter() upAdapter()

Loading…
Cancel
Save