优化
This commit is contained in:
1 parent
540e413419
commit
4f6868d303
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user