Refactor reader
This commit is contained in:
@@ -8,6 +8,7 @@ import androidx.lifecycle.viewModelScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.flowOn
|
||||
import kotlinx.coroutines.flow.onStart
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.koitharu.kotatsu.R
|
||||
@@ -52,7 +53,7 @@ class LocalListViewModel(
|
||||
}
|
||||
}.onStart {
|
||||
emit(listOf(LoadingState))
|
||||
}.asLiveData(viewModelScope.coroutineContext + Dispatchers.Default)
|
||||
}.flowOn(Dispatchers.Default).asLiveData(viewModelScope.coroutineContext)
|
||||
|
||||
init {
|
||||
onRefresh()
|
||||
|
||||
Reference in New Issue
Block a user