历史检索记录完善
This commit is contained in:
@@ -78,6 +78,9 @@ public class SearchHistoryRecordManager extends BaseCacheManager {
|
||||
if (historyRecordList.size() == 10) {
|
||||
historyRecordList.remove(0);
|
||||
}
|
||||
for (SearchHistoryModel historyModel : historyRecordList) {
|
||||
if (historyModel.getSimplified().equals(key)) return;
|
||||
}
|
||||
historyRecordList.add(new SearchHistoryModel(key, value));
|
||||
String json = new Gson().toJson(historyRecordList);
|
||||
put(KEY_HISTORY_RECORD, json);
|
||||
|
||||
Reference in New Issue
Block a user