Browse Source

REPORT-5856 去除无效action

master
XiaXiang 7 years ago
parent
commit
6623b37bed
  1. 9
      designer/src/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

9
designer/src/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

@ -1,10 +1,13 @@
package com.fr.design.mainframe.alphafine.search.manager.impl; package com.fr.design.mainframe.alphafine.search.manager.impl;
import com.fr.design.mainframe.alphafine.CellType;
import com.fr.design.mainframe.alphafine.cell.CellModelHelper; import com.fr.design.mainframe.alphafine.cell.CellModelHelper;
import com.fr.design.mainframe.alphafine.cell.model.ActionModel;
import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel;
import com.fr.design.mainframe.alphafine.cell.model.MoreModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider;
import com.fr.design.mainframe.toolbar.UpdateActionManager;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.json.JSONException; import com.fr.json.JSONException;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
@ -178,7 +181,11 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
for (ScoreDoc scoreDoc : scores) { for (ScoreDoc scoreDoc : scores) {
Document document = searcher.doc(scoreDoc.doc); Document document = searcher.doc(scoreDoc.doc);
AlphaCellModel model = CellModelHelper.getModelFromJson(new JSONObject(document.get("cellModel"))); AlphaCellModel model = CellModelHelper.getModelFromJson(new JSONObject(document.get("cellModel")));
this.recentModelList.add(model); if (model.getType() == CellType.ACTION && !UpdateActionManager.getUpdateActionManager().isEnable(((ActionModel) model).getAction())) {
continue;
} else {
recentModelList.add(model);
}
} }
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save