Skip to content

Commit

Permalink
added more parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
RenHeyzer committed Jan 11, 2022
1 parent f4b1fa9 commit 29c688f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import com.example.rickandmortyapp.domain.models.RickAndMorty

class CharactersPagingSource(
private val service: CharactersApiService,
private val name: String
private val name: String,
private val status: String,
private val gender: String
) : BasePagingSource<RickAndMortyDto.CharactersItem, RickAndMorty.CharactersItem>(
{ service.getCharacters(it, name) },
{ service.getCharacters(it, name, status, gender) },
{ data -> data.map { it.toCharacters() } }
)

0 comments on commit 29c688f

Please sign in to comment.