处理订单列表加载更多问题
This commit is contained in:
@@ -5,6 +5,7 @@ import com.sw.inbound.repository.RemoteRepository
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
@@ -46,6 +47,7 @@ class PurchaseOrderViewModel @Inject constructor(
|
||||
if (parseResponse(response)) {
|
||||
response.result?.records?.let {
|
||||
_canLoadMore.value = it.size >= pageSize
|
||||
Timber.d("加载更多 canLoadMore =${it.size >= pageSize}")
|
||||
_supplierList.value = _supplierList.value + it
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user