处理订单列表加载更多问题

This commit is contained in:
zxj
2025-07-25 17:26:56 +08:00
parent 274a278a09
commit 2eec3ec1d4
3 changed files with 47 additions and 16 deletions
@@ -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
}
}