|
@@ -83,14 +83,12 @@ public class PersonnelDataActivity extends BaseActivity implements View.OnClickL
|
|
dataList = FaceApi.getInstance().getAllUserList();
|
|
dataList = FaceApi.getInstance().getAllUserList();
|
|
final int tempTotalSize = dataList.size();
|
|
final int tempTotalSize = dataList.size();
|
|
post(() -> {
|
|
post(() -> {
|
|
- if (!isSearching && mAdapter != null) {
|
|
|
|
|
|
+ if (!isSearching && mAdapter != null && dataList != null
|
|
|
|
+ /*&& tempTotalSize > totalSize*/) {
|
|
mAdapter.setList(dataList);
|
|
mAdapter.setList(dataList);
|
|
- mAdapter.notifyDataSetChanged();
|
|
|
|
- if (dataList != null && tempTotalSize > totalSize) {
|
|
|
|
- totalSize=tempTotalSize;
|
|
|
|
- if(setUPIncloud_title!=null) {
|
|
|
|
- setUPIncloud_title.setText("人员数据(" + totalSize + ")");
|
|
|
|
- }
|
|
|
|
|
|
+ totalSize = tempTotalSize;
|
|
|
|
+ if (setUPIncloud_title != null) {
|
|
|
|
+ setUPIncloud_title.setText("人员数据(" + totalSize + ")");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
removeMessages(WHAT_REFRESH);
|
|
removeMessages(WHAT_REFRESH);
|
|
@@ -215,7 +213,7 @@ public class PersonnelDataActivity extends BaseActivity implements View.OnClickL
|
|
//关闭软键盘
|
|
//关闭软键盘
|
|
KeyboardsUtils.hintKeyBoards(personnelData_inquire);
|
|
KeyboardsUtils.hintKeyBoards(personnelData_inquire);
|
|
try {
|
|
try {
|
|
- if(mAdapter.getList() == null ||mAdapter.getList().size() ==0){
|
|
|
|
|
|
+ if(dataList == null ||dataList.size() ==0){
|
|
Toast.makeText(this, "暂无人员数据,请稍后重试~", Toast.LENGTH_SHORT).show();
|
|
Toast.makeText(this, "暂无人员数据,请稍后重试~", Toast.LENGTH_SHORT).show();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -236,7 +234,7 @@ public class PersonnelDataActivity extends BaseActivity implements View.OnClickL
|
|
if (StringIsNull.IsStringNull(id) && StringIsNull.IsStringNull(cardNumber) && StringIsNull.IsStringNull(name)
|
|
if (StringIsNull.IsStringNull(id) && StringIsNull.IsStringNull(cardNumber) && StringIsNull.IsStringNull(name)
|
|
&& StringIsNull.IsStringNull(idNumber) && StringIsNull.IsStringNull(phone)){
|
|
&& StringIsNull.IsStringNull(idNumber) && StringIsNull.IsStringNull(phone)){
|
|
mHandler.removeMessages(WHAT_REFRESH);
|
|
mHandler.removeMessages(WHAT_REFRESH);
|
|
- mHandler.sendEmptyMessageDelayed(WHAT_REFRESH,1000);
|
|
|
|
|
|
+ mHandler.sendEmptyMessageDelayed(WHAT_REFRESH,1000); //标题会在延迟1秒后更新
|
|
isSearching = false;
|
|
isSearching = false;
|
|
return dataList;
|
|
return dataList;
|
|
}
|
|
}
|