Refactor reader

This commit is contained in:
Koitharu
2020-12-16 08:25:43 +02:00
parent 71a5801a0c
commit 904d12f611
80 changed files with 1239 additions and 1132 deletions

View File

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