|
|
@ -27,10 +27,7 @@ import com.fr.stable.xml.XMLTools; |
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.*; |
|
|
|
import java.io.*; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.*; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Created by XiaXiang on 2017/5/15. |
|
|
|
* Created by XiaXiang on 2017/5/15. |
|
|
@ -226,12 +223,15 @@ public class RecentSearchManager extends XMLFileManager implements AlphaFineSear |
|
|
|
if (ComparatorUtils.equals(key, searchText)) { |
|
|
|
if (ComparatorUtils.equals(key, searchText)) { |
|
|
|
recentModelList = recentKVModelMap.get(searchText); |
|
|
|
recentModelList = recentKVModelMap.get(searchText); |
|
|
|
List<AlphaCellModel> resultModelList = new ArrayList<>(recentModelList); |
|
|
|
List<AlphaCellModel> resultModelList = new ArrayList<>(recentModelList); |
|
|
|
int size = resultModelList.size(); |
|
|
|
Iterator<AlphaCellModel> modelIterator = resultModelList.iterator(); |
|
|
|
for (AlphaCellModel model : resultModelList) { |
|
|
|
while (modelIterator.hasNext()) { |
|
|
|
|
|
|
|
AlphaCellModel model = modelIterator.next(); |
|
|
|
if (model.getType() == CellType.ACTION && !((ActionModel) model).getAction().isEnabled()) { |
|
|
|
if (model.getType() == CellType.ACTION && !((ActionModel) model).getAction().isEnabled()) { |
|
|
|
resultModelList.remove(model); |
|
|
|
resultModelList.remove(model); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
int size = resultModelList.size(); |
|
|
|
if (size > MAX_SIZE) { |
|
|
|
if (size > MAX_SIZE) { |
|
|
|
return resultModelList.subList(size - MAX_SIZE, size); |
|
|
|
return resultModelList.subList(size - MAX_SIZE, size); |
|
|
|
} |
|
|
|
} |
|
|
|