Dagger2: Using CompositeDisposable with Android Paging Library
问题 I'm using Dagger2. I will be injecting CompositeDisposable in ViewModel through @Inject constructor(private val compositeDisposable: CompositeDisposable) And my screen would also be using Android Pagination library and inside PageKeyedDataSource class I would be adding every network call into compositeDisposable using it's .add(diposable) . I also would be adding CompositeDisposable in PageKeyedDataSource constructor through Dagger graph. Is there any way that CompositeDisposable in ViewModel