This commit is contained in:
kunfei
2022-08-22 23:01:27 +08:00
parent 540e413419
commit 4f6868d303
@@ -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)