优化
This commit is contained in:
@@ -79,10 +79,16 @@ class UserViewModel : BaseViewModel() {
|
||||
return@launchWithLoading
|
||||
}
|
||||
val faceEntityList = list.map {
|
||||
FaceEntity(it.userId, null, Base64.decode(it.faceFeatureStr))
|
||||
FaceEntity(it.userId, null, Base64.decode(it.faceFeatureStr)).apply {
|
||||
userType = if (it.isMember) "1" else "2"
|
||||
}
|
||||
}
|
||||
withContext(Dispatchers.Default) {
|
||||
faceApi.updateFaceData(pageNo, faceEntityList)
|
||||
if (currentPageNo == 1) {
|
||||
//第一页数据删除本地数据库
|
||||
faceApi.clearFaceData()
|
||||
}
|
||||
faceApi.updateFaceData( pageNo, faceEntityList)
|
||||
if (list.size >= pageSize) {
|
||||
faceTimestamp = list.last().faceUpdateTimestamp ?: 0
|
||||
currentPageNo++
|
||||
@@ -103,6 +109,7 @@ class UserViewModel : BaseViewModel() {
|
||||
|
||||
private var faceTimestamp = 0L
|
||||
|
||||
|
||||
/**
|
||||
* 激活人脸识别引擎
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user