From 29c688f30ee99584cd4e2431aa31fe19d4aeb873 Mon Sep 17 00:00:00 2001 From: RenHeyzer Date: Tue, 11 Jan 2022 20:12:59 +0600 Subject: [PATCH] added more parameters --- .../implementation/pagingsources/CharactersPagingSource.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/example/rickandmortyapp/data/implementation/pagingsources/CharactersPagingSource.kt b/app/src/main/java/com/example/rickandmortyapp/data/implementation/pagingsources/CharactersPagingSource.kt index 9ac32b6..b3cf588 100644 --- a/app/src/main/java/com/example/rickandmortyapp/data/implementation/pagingsources/CharactersPagingSource.kt +++ b/app/src/main/java/com/example/rickandmortyapp/data/implementation/pagingsources/CharactersPagingSource.kt @@ -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( - { service.getCharacters(it, name) }, + { service.getCharacters(it, name, status, gender) }, { data -> data.map { it.toCharacters() } } ) \ No newline at end of file