|
|
@@ -68,9 +68,7 @@ public class SelectAimPresenter implements HttpHandler.OnResultListener {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- if (ListUtils.isEmpty(keyList))
|
|
|
- keyList = new ArrayList<>();
|
|
|
- else keyList.clear();
|
|
|
+ keyList = new ArrayList<>();
|
|
|
boolean isFirst = true;
|
|
|
for (SelectAimModel e : models) {
|
|
|
if (isIncude(keyWork, e)) {
|
|
|
@@ -196,6 +194,9 @@ public class SelectAimPresenter implements HttpHandler.OnResultListener {
|
|
|
if (ListUtils.isEmpty(models)) {
|
|
|
showEmpty();
|
|
|
} else {
|
|
|
+ if (hasEmpty(keyList)) {
|
|
|
+ keyList = new ArrayList<>();
|
|
|
+ }
|
|
|
keyList.addAll(models);
|
|
|
showEmpty();
|
|
|
}
|
|
|
@@ -277,12 +278,22 @@ public class SelectAimPresenter implements HttpHandler.OnResultListener {
|
|
|
if (!StringUtils.isEmpty(keyWork)) {//有搜索
|
|
|
if (ListUtils.isEmpty(keyList))
|
|
|
keyList = new ArrayList<>();
|
|
|
+ if (hasEmpty(keyList)) {
|
|
|
+ keyList = new ArrayList<>();
|
|
|
+ }
|
|
|
keyList.addAll(models);
|
|
|
show(keyList);
|
|
|
} else
|
|
|
show(models);
|
|
|
}
|
|
|
|
|
|
+ private boolean hasEmpty(List<SelectAimModel> keyList) {
|
|
|
+ if (ListUtils.isEmpty(keyList)) return false;
|
|
|
+ for (SelectAimModel e : keyList)
|
|
|
+ if (e.getType() == 1) return true;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private void show(List<SelectAimModel> models) {
|
|
|
if (iSelectAim != null) {
|
|
|
iSelectAim.showModel(models);
|