diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java index 2f0b695b24..5e42929e93 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java @@ -185,19 +185,11 @@ public class RecentSearchManager implements AlphaFineSearchProvider { UpdateAction action = UpdateActionManager.getUpdateActionManager().getActionByName(model.getName()); if (action != null) { ((ActionModel) model).setAction(action); - if (recentModelList.contains(model)) { - continue; - } - recentModelList.add(model); + addModel(model); } } else { - if (recentModelList.contains(model)) { - continue; - } - recentModelList.add(model); + addModel(model); } - - } } catch (Exception e) { FineLoggerFactory.getLogger().error("local search error: " + e.getMessage()); @@ -206,5 +198,11 @@ public class RecentSearchManager implements AlphaFineSearchProvider { return recentModelList; } + private void addModel(AlphaCellModel model) { + if (!recentModelList.contains(model)) { + recentModelList.add(model); + } + } + }