Skip to content

Conversation

@Aluminiy
Copy link

No description provided.


private val _catsLiveData = MutableLiveData<Result>()
val catsLiveData: LiveData<Result> = _catsLiveData
val disposable = CompositeDisposable()

Choose a reason for hiding this comment

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

нужно отписаться в onCleared, чтобы не утекало

}
})
})*/
getFacts(catsService, localCatFactsGenerator)

Choose a reason for hiding this comment

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

если сделать catsService и localCatFactsGenerator полями (добавить в конструктор private val), то не надо будет прокидывать их в функцию, плюс заодно context удалить, он теперь не нужен

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