Skip to content

Conversation

@dmilkov97
Copy link

No description provided.

import retrofit2.Response
import java.util.concurrent.TimeUnit

class CatsViewModel(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

context больше не нужен, можно убрать его отсюда и из CatsViewModelFactory

fun getFacts() {

val disposable = Observable.interval(0, 2000, TimeUnit.MILLISECONDS)
.flatMapSingle {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше добавить subscribeOn чтобы запросы шли в фоновом потоке

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants