Joan Colmenero

05/11/2020, 6:54 AM
Hello guys, I'm planning to create an endless scroll-view and I've found this Paging library from the Jetpack, looks very interesting but I do not get one thing, I'm used to from the repository do the mapper to the domain object, so from the use-case/inter-actor I have the domain object already done because I map it on the repository layer, my question is, dis data source that I have to create and this
where is the correct layer to use it? Because I have to pass an object and don't know if it's the domain object or the response from retrofit.

Dustin Lam

05/11/2020, 7:42 PM
If I'm understanding correctly, you're looking to map the data you load in your datasource to some other type?
There is a .map api in PageKeyedDataSource
The DataSource classes are meant to be part of your repository layer