pull/2189/head
kunfei 3 years ago
parent 6cef2f5a5d
commit fa204e048d
  1. 2
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt

@ -341,7 +341,7 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel
historyFlowJob?.cancel() historyFlowJob?.cancel()
historyFlowJob = launch { historyFlowJob = launch {
when { when {
key.isNullOrBlank() -> appDb.searchKeywordDao.flowByUsage() key.isNullOrBlank() -> appDb.searchKeywordDao.flowByTime()
else -> appDb.searchKeywordDao.flowSearch(key) else -> appDb.searchKeywordDao.flowSearch(key)
}.conflate().collect { }.conflate().collect {
historyKeyAdapter.setItems(it) historyKeyAdapter.setItems(it)

Loading…
Cancel
Save