|
|
@ -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) |
|
|
|