Skip to content

Commit

Permalink
LPS-201091 Adapt removeLabelURLs depending on feature flag value
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-pulido authored and brianchandotcom committed Nov 30, 2023
1 parent c4088d8 commit 82398c7
Showing 1 changed file with 40 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,26 @@ public List<LabelItem> getFilterLabelItems() {
labelItemListWrapper.add(
_journalDisplayContext::isNavigationMine,
labelItem -> {
labelItem.putData(
"removeLabelURL",
PortletURLBuilder.create(
PortletURLUtil.clone(
currentURLObj, liferayPortletResponse)
).setParameter(
"navigationMine", (String)null
).buildString());
if (FeatureFlagManagerUtil.isEnabled("LPS-196768")) {
labelItem.putData(
"removeLabelURL",
PortletURLBuilder.create(
PortletURLUtil.clone(
currentURLObj, liferayPortletResponse)
).setParameter(
"navigationMine", (String)null
).buildString());
}
else {
labelItem.putData(
"removeLabelURL",
PortletURLBuilder.create(
PortletURLUtil.clone(
currentURLObj, liferayPortletResponse)
).setNavigation(
(String)null
).buildString());
}

labelItem.setCloseable(true);

Expand All @@ -407,14 +419,26 @@ public List<LabelItem> getFilterLabelItems() {
).add(
_journalDisplayContext::isNavigationRecent,
labelItem -> {
labelItem.putData(
"removeLabelURL",
PortletURLBuilder.create(
PortletURLUtil.clone(
currentURLObj, liferayPortletResponse)
).setParameter(
"navigationRecent", (String)null
).buildString());
if (FeatureFlagManagerUtil.isEnabled("LPS-196768")) {
labelItem.putData(
"removeLabelURL",
PortletURLBuilder.create(
PortletURLUtil.clone(
currentURLObj, liferayPortletResponse)
).setParameter(
"navigationRecent", (String)null
).buildString());
}
else {
labelItem.putData(
"removeLabelURL",
PortletURLBuilder.create(
PortletURLUtil.clone(
currentURLObj, liferayPortletResponse)
).setNavigation(
(String)null
).buildString());
}

labelItem.setCloseable(true);
labelItem.setLabel(
Expand Down

0 comments on commit 82398c7

Please sign in to comment.