pull/1649/head
kunfei 3 years ago
parent 0cf1474275
commit 49739549e9
  1. 4
      app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt

@ -8,8 +8,10 @@ import io.legado.app.data.appDb
import io.legado.app.data.entities.SearchBook
import io.legado.app.data.entities.SearchKeyword
import io.legado.app.model.webBook.SearchModel
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.flow.flowOn
class SearchViewModel(application: Application) : BaseViewModel(application) {
private val searchModel = SearchModel(viewModelScope)
@ -47,7 +49,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application) {
awaitClose {
searchModel.unRegisterCallback()
}
}
}.flowOn(IO)
/**
* 开始搜索

Loading…
Cancel
Save