打开增加检查网络情况

This commit is contained in:
2026-02-11 14:48:30 +08:00
parent ac30d95812
commit 0c990ea7ee
7 changed files with 136 additions and 47 deletions
@@ -185,17 +185,17 @@ class UserViewModel : BaseViewModel() {
return@withContext
}
onPageQueryFinished(list)
if (list.size >= pageSize) {
lastFaceTimestamp = list.last().faceUpdateTimestamp ?: 0L
getFaceIncrementList(
pageNo = pageNo + 1,
pageSize = pageSize,
timestamp = timestamp,
onAllQueryFinished = onAllQueryFinished,
onPageQueryFinished = onPageQueryFinished
)
return@withContext
}
// if (list.size >= pageSize) {
// lastFaceTimestamp = list.last().faceUpdateTimestamp ?: 0L
// getFaceIncrementList(
// pageNo = pageNo + 1,
// pageSize = pageSize,
// timestamp = timestamp,
// onAllQueryFinished = onAllQueryFinished,
// onPageQueryFinished = onPageQueryFinished
// )
// return@withContext
// }
//查询完成所有数据,保存时间戳
if (list.isNotEmpty()) {
//非空实现最后一条数据的是时间戳,空使用上次list最后一条时间戳
@@ -576,7 +576,7 @@ class UserViewModel : BaseViewModel() {
launchWithLoading {
val response = repository.getCollectedFoodVector(param)
if (parseResponse(response)) {
block(response.data)
block(response.data?:emptyList())
} else {
block(null)
}