mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -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