mirror of
https://github.com/gedoor/legado.git
synced 2024-07-17 00:58:29 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2bdf640284
@ -16,11 +16,12 @@ import io.legado.app.utils.stackTraceStr
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.mapLatest
|
||||
import java.util.Collections
|
||||
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
class ExploreShowViewModel(application: Application) : BaseViewModel(application) {
|
||||
val bookshelf = hashSetOf<String>()
|
||||
val bookshelf: MutableSet<String> = Collections.synchronizedSet(hashSetOf<String>())
|
||||
val upAdapterLiveData = MutableLiveData<String>()
|
||||
val booksData = MutableLiveData<List<SearchBook>>()
|
||||
val errorLiveData = MutableLiveData<String>()
|
||||
|
@ -16,11 +16,12 @@ import io.legado.app.utils.ConflateLiveData
|
||||
import io.legado.app.utils.toastOnUi
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.mapLatest
|
||||
import java.util.Collections
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
class SearchViewModel(application: Application) : BaseViewModel(application) {
|
||||
val handler = Handler(Looper.getMainLooper())
|
||||
val bookshelf = hashSetOf<String>()
|
||||
val bookshelf: MutableSet<String> = Collections.synchronizedSet(hashSetOf<String>())
|
||||
val upAdapterLiveData = MutableLiveData<String>()
|
||||
var searchBookLiveData = ConflateLiveData<List<SearchBook>>(1000)
|
||||
val searchScope: SearchScope = SearchScope(AppConfig.searchScope)
|
||||
|
Loading…
Reference in New Issue
Block a user