|
|
|
@ -35,7 +35,7 @@ import java.util.Map;
|
|
|
|
|
public class RecentSearchManager extends XMLFileManager implements AlphaFineSearchProcessor { |
|
|
|
|
|
|
|
|
|
private static final String XML_TAG = "AlphafineRecent"; |
|
|
|
|
private static final int COUNT = 3; |
|
|
|
|
private static final int MAX_SIZE = 3; |
|
|
|
|
private static RecentSearchManager recentSearchManager = null; |
|
|
|
|
private static File recentFile = null; |
|
|
|
|
private List<String> fileList; |
|
|
|
@ -250,8 +250,8 @@ public class RecentSearchManager extends XMLFileManager implements AlphaFineSear
|
|
|
|
|
if (ComparatorUtils.equals(key, searchText)) { |
|
|
|
|
recentModelList = recentKVModelMap.get(searchText); |
|
|
|
|
int size = recentModelList.size(); |
|
|
|
|
if (size > COUNT) { |
|
|
|
|
return recentModelList.subList(size - COUNT, size); |
|
|
|
|
if (size > MAX_SIZE) { |
|
|
|
|
return recentModelList.subList(size - MAX_SIZE, size); |
|
|
|
|
} |
|
|
|
|
return recentModelList; |
|
|
|
|
} |
|
|
|
|