Skip to content

Commit

Permalink
Check if item is active and added global items
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim203 committed Jun 8, 2021
1 parent 68cd2eb commit acc3a82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ public String getProject() {
return project;
}

public boolean isGlobal() {
return "all".equals(getProject());
}

public boolean isActive() {
return active;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ public void addNews(NewsItem item) {
return;
}

if (!Constants.NEWS_PROJECT_LIST.contains(item.getProject())) {
if (!item.isActive()) {
return;
}

if (!item.isGlobal() && !Constants.NEWS_PROJECT_LIST.contains(item.getProject())) {
return;
}

Expand Down

0 comments on commit acc3a82

Please sign in to comment.