details: review: Move nextPageUrl variable to function
This is only used pager, no need to expose to the class Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -37,7 +37,6 @@ class DetailsReviewViewModel @AssistedInject constructor(
|
|||||||
|
|
||||||
private val TAG = DetailsReviewViewModel::class.java.simpleName
|
private val TAG = DetailsReviewViewModel::class.java.simpleName
|
||||||
|
|
||||||
private var reviewsNextPageUrl: String? = null
|
|
||||||
private val _reviews = MutableStateFlow<PagingData<Review>>(PagingData.empty())
|
private val _reviews = MutableStateFlow<PagingData<Review>>(PagingData.empty())
|
||||||
val reviews = _reviews.asStateFlow()
|
val reviews = _reviews.asStateFlow()
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ class DetailsReviewViewModel @AssistedInject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun fetchReviews(filter: Review.Filter = Review.Filter.ALL) {
|
fun fetchReviews(filter: Review.Filter = Review.Filter.ALL) {
|
||||||
reviewsNextPageUrl = null
|
var reviewsNextPageUrl: String? = null
|
||||||
|
|
||||||
createPager { page ->
|
createPager { page ->
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user