This commit is contained in:
kunfei
2022-08-22 23:01:27 +08:00
parent 6cef2f5a5d
commit fa204e048d

View File

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