Skip to content

Commit

Permalink
Remove unused parameter from method
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannakok committed May 15, 2024
1 parent c917e22 commit 17fd0a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion article/app/pages/StoryHtmlPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object StoryHtmlPage {
if (pageWithStoryPackage.item.tags.isLiveBlog) {
Html(s"<script>window.guardian.config.page.dcrCouldRender = true</script>")
} else {
val thisDcrCouldRender: Boolean = dcrChecks(pageWithStoryPackage, request).values.forall(identity)
val thisDcrCouldRender: Boolean = dcrChecks(pageWithStoryPackage).values.forall(identity)
Html(s"<script>window.guardian.config.page.dcrCouldRender = $thisDcrCouldRender</script>")
}
}
Expand Down
10 changes: 5 additions & 5 deletions article/app/services/dotcomrendering/ArticlePicker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ object ArticlePageChecks {

object ArticlePicker {

def dcrChecks(page: PageWithStoryPackage, request: RequestHeader): Map[String, Boolean] = {
def dcrChecks(page: PageWithStoryPackage): Map[String, Boolean] = {
Map(
("isSupportedType", ArticlePageChecks.isSupportedType(page)),
("isNotAGallery", ArticlePageChecks.isNotAGallery(page)),
)
}

private[this] def dcrArticle100PercentPage(page: PageWithStoryPackage, request: RequestHeader): Boolean = {
val allowListFeatures = dcrChecks(page, request)
private[this] def dcrArticle100PercentPage(page: PageWithStoryPackage): Boolean = {
val allowListFeatures = dcrChecks(page)
val article100PercentPageFeatures = allowListFeatures.view.filterKeys(
Set(
"isSupportedType",
Expand All @@ -45,14 +45,14 @@ object ArticlePicker {
def getTier(page: PageWithStoryPackage, path: String)(implicit
request: RequestHeader,
): RenderType = {
val checks = dcrChecks(page, request)
val checks = dcrChecks(page)
val dcrCanRender = checks.values.forall(identity)
val isNotPaidContent = ArticlePageChecks.isNotPaidContent(page)
val shouldServePressed = PressedContent.isPressed(ensureStartingForwardSlash(path)) && isNotPaidContent

val tier: RenderType = decideTier(shouldServePressed, dcrCanRender)

val isArticle100PercentPage = dcrArticle100PercentPage(page, request);
val isArticle100PercentPage = dcrArticle100PercentPage(page)
val pageTones = page.article.tags.tones.map(_.id).mkString(", ")

// include features that we wish to log but not allow-list against
Expand Down

0 comments on commit 17fd0a5

Please sign in to comment.